Hi, guys.
I am learning Cocoa right now, and
I am working on a small Cocoa project try to learn how to use NSNumberFormatter,
This project is a simple screen capture program and I want it has the ability to auto save the captured image file.
I create three NSTextField for users
one is Filename prefix
another one is digit,
and the last is the length of the digit.
So when users capture the screenshot my program should automatically save file with the naming rule.
For Example: I have a fifth image captured. and the digit length is 4.
The file name will be: "FileNamePrefix-0005.jpg"
And then auto increment one for next image.
How can I make the digit in the fixed length.
I have looked up NSNumberFormatter and try to find something can help me on this, however it seems not for this kind of usage.
Any reply will be highly appreciated, thank you so much.
I am learning Cocoa right now, and
I am working on a small Cocoa project try to learn how to use NSNumberFormatter,
This project is a simple screen capture program and I want it has the ability to auto save the captured image file.
I create three NSTextField for users
one is Filename prefix
another one is digit,
and the last is the length of the digit.
So when users capture the screenshot my program should automatically save file with the naming rule.
For Example: I have a fifth image captured. and the digit length is 4.
The file name will be: "FileNamePrefix-0005.jpg"
And then auto increment one for next image.
How can I make the digit in the fixed length.
I have looked up NSNumberFormatter and try to find something can help me on this, however it seems not for this kind of usage.
Any reply will be highly appreciated, thank you so much.