You need to log in to create posts and topics.
“About” Your Application
77,940 Posts
#1 · March 9, 2022, 11:23 am
Quote from Forum Archives on March 9, 2022, 11:23 amPosted by: maxetaylorjr <maxetaylorjr@...>
FWIW, I thought I’d pass along a little something I use to setup and build and application About window in hopes it may be helpful to anyone.In a file at the top of your application define the globals below like the examples below with your data. This allows you to update the “About” information without messing with the function that displays it.The system will put the “Build” string inside parenthesis. I use a Year and Julian date combination to create a Build string that gives me the year and day of the applications compilation.The first number, “2” represents the last digit of the year (2022) and the next three the day of the year. So, “2068” represents “March 9, 2022”. If a client give you the build number you know when the application was compiled.If the Julian calendar png file below doesn’t come through you can contact me directly for a really nice file I keep on my desktop for instant access but simply selecting the icon and pressing the space bar.I also use the same four digit sequence in documents or anywhere else I want to encode a date.
—————————begin globalsdim as CFStringRef CustomProjectNameStrCustomProjectNameStr = @"iDeed III FB"dim as CFStringRef CustomVersionStrCustomVersionStr = @"3.1.12 "dim as CFStringRef CustomBuildStrCustomBuildStr = @"Build 2068"dim as CFStringRef CustomCreditsStrCustomCreditsStr = @"Max Emmons Taylor Jr. - 4VFK20629rKenneth Elywn Bartel - 4RBE70525n"dim as CFStringRef CustomCopyright1StrCustomCopyright1Str = @"Copyright 2017-2022 Max Emmons Taylor Jr.rAll Worldwide Rights Reserved"End globals—————————The following function can be used as it or the name changed. I have all the functions that pertain to Menu selections named starting with “Menu” and all in a Menu function only file in a project.Once the globals are defined any call to the function below will produce an “About” window.—————————void local fn Menu_About_Panel'~'1CFDictionaryRef dictCFMutableAttributedStringRef attrStrattrStr = fn MutableAttributedStringWithString( CustomCreditsStr )BeginCCodedict = (CFDictionaryRef) @{@"ApplicationName" : (NSString*) CustomProjectNameStr,@"ApplicationVersion" : (NSString*) CustomVersionStr,@"Version" : (NSString*) CustomBuildStr,@"Credits" : (NSAttributedString *) attrStr,@"Copyright" : (NSString*) CustomCopyright1Str,};EndCAppOrderFrontStandardAboutPanelWithOptions( dict )end fn——————————————————by: Max Emmons Taylor Jr. ©FB 7.0.12OS 12.2.1 MontereyXcode 13.2.14VFK20629—————————--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@freegroups.net To access the list archives, go to: http://freegroups.net/groups/futurebasic/
Posted by: maxetaylorjr <maxetaylorjr@...>
FWIW, I thought I’d pass along a little something I use to setup and build and application About window in hopes it may be helpful to anyone.
In a file at the top of your application define the globals below like the examples below with your data. This allows you to update the “About” information without messing with the function that displays it.
The system will put the “Build” string inside parenthesis. I use a Year and Julian date combination to create a Build string that gives me the year and day of the applications compilation.
The first number, “2” represents the last digit of the year (2022) and the next three the day of the year. So, “2068” represents “March 9, 2022”. If a client give you the build number you know when the application was compiled.
If the Julian calendar png file below doesn’t come through you can contact me directly for a really nice file I keep on my desktop for instant access but simply selecting the icon and pressing the space bar.
I also use the same four digit sequence in documents or anywhere else I want to encode a date.
—————————
begin globals
dim as CFStringRef CustomProjectNameStr
CustomProjectNameStr = @"iDeed III FB"
dim as CFStringRef CustomVersionStr
CustomVersionStr = @"3.1.12 "
dim as CFStringRef CustomBuildStr
CustomBuildStr = @"Build 2068"
dim as CFStringRef CustomCreditsStr
CustomCreditsStr = @"Max Emmons Taylor Jr. - 4VFK20629rKenneth Elywn Bartel - 4RBE70525n"
dim as CFStringRef CustomCopyright1Str
CustomCopyright1Str = @"Copyright 2017-2022 Max Emmons Taylor Jr.rAll Worldwide Rights Reserved"
End globals
—————————
The following function can be used as it or the name changed. I have all the functions that pertain to Menu selections named starting with “Menu” and all in a Menu function only file in a project.
Once the globals are defined any call to the function below will produce an “About” window.
—————————
void local fn Menu_About_Panel
'~'1
CFDictionaryRef dict
CFMutableAttributedStringRef attrStr
attrStr = fn MutableAttributedStringWithString( CustomCreditsStr )
BeginCCode
dict = (CFDictionaryRef) @{
@"ApplicationName" : (NSString*) CustomProjectNameStr,
@"ApplicationVersion" : (NSString*) CustomVersionStr,
@"Version" : (NSString*) CustomBuildStr,
@"Credits" : (NSAttributedString *) attrStr,
@"Copyright" : (NSString*) CustomCopyright1Str,
};
EndC
AppOrderFrontStandardAboutPanelWithOptions( dict )
end fn
—————————


—————————
by: Max Emmons Taylor Jr. ©
FB 7.0.12
OS 12.2.1 Monterey
Xcode 13.2.1
4VFK20629
—————————
--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@freegroups.net To access the list archives, go to: http://freegroups.net/groups/futurebasic/
Click for thumbs down.0Click for thumbs up.0