Forum Replies Created
- AuthorPosts
- JD KromkowskiParticipant
Moving on (with my work around to build)
An error is through because the form (I think) can't locate the .png logo
in drive "X:etc, etc" which is probably the name of your drive where the
png logo was located.Presumably that .png should have been included in this directory:
C:SIMPOLProjectstutorialsbairbin
and "checkin.sfx" would need to be modified to point to the correct
location of the .pngAm I on the correct path?
JDK
JD KromkowskiParticipantUpon further investigation, I see that the "errors.sma" is only located in
the SIMPOLinclude directory.I did "save as" and put in in the same dir as the other .sma, but then
building results in this error.Cannot open file 'uisyshelphdr.sma'
Same issue. Same fix on my part.
So what this suggests is that somehow the "include" setting in SETTINGS
is not working correctly because I can see that the "SIMPOLinclude"
directory is listed under "included".Any further thoughts?
JD KromkowskiParticipantWell, we'll see about the stuffing it in a function thing when we see it
but in the interimthe wxform f (which I presume holds the combo boxes for the current table
and current index is created here:f =@ combos(colors)
but that code:
function combos(colors)
end functionwasn't posted. Please advise.
JDK
JD KromkowskiParticipantI think the bug is actually worse. Don't have time to document fully, but
if you change the display format to 24 hour (i.e. uncheck am/pm) (and you
can make it apply – there is a different bug here noted below) and then
enter a time in pm format using "pm" (e.g. "12:42 pm") the whole thing
shuts down.When trying to modify table and changing display format, you won't always
get OK or DISPLAY buttons (they remain disabled) until you change the
field to indexed (and back to not indexed if you don't actually want the
field to be indexed but just want to change the display format.)JD KromkowskiParticipantIt actually changes "pm" to "am"
So if you type "12:15 pm" it will change it to "12:15 am".
In fact if you type in "12:nn pm" for nn equal 00 to 59 it will change it
to "12:nn am"JD KromkowskiParticipantWhoops. Question follows but first Comment and 2 Suggestions.
There just seems to be so much overhead to do something so simple.
in main function()
wxtoolbar tb
tb =@ CreateToolBar()
tb.setwindow(w)Suggestion 1
//toolbars handled like opendataform() which I guess would be in a library
called something like ToolBarLibfunction CreateToolBar()
wxtoolbar tb
string filename
filename = "C/Simpol/IconBars/this_is_an_sxf"
integer error; error = 0
string errtext; errtext =""
tb =@ opentoolbar(filename, error=error, errortext=errtext)
end function tbSuggestion 2
function CreateToolBar()
integer e; e=0
boolean standard; standard = .true
wxtoolbar tb
// add a boolean parameter called standard
// if standard == .true, which it is by default then the standard
ToolBar
// is created
// if standard == .false, then a blank ToolBar is created andtb =@ wxtoolbar.new(16,16,error = e, standard = standard)
if you want to have a customize toolbar then you'd do this
tb =@ wxtoolbar.new(16,16,error = e, standard = .false)and proceed to use tb.insert() to create your own, e.g.
bmp =@ wxbitmap.new("16x16_selfirst.png", "png")
disbmp =@ wxbitmap.new("16x16_selfirst_disabled.png", "png")
tb.insert(bmp, disbmp, enabled=.false, tooltip="Select first
record", name="tSelFirst")
tb!tSelFirst.onclick.function =@ selrecnow to the QUESTION
> function buildiconbar(syscolors colors)
> wxbitmap bmp, disbmp
> integer e
> wxtoolbar tb
> wxform fI don't see where f is created?
It obviously must be happening in the combos function?
f =@ combos(colors)
but that code isn't here. Please advise.
And as to what creates the "colors", something like?
function Colors()
integer e
syscolors colors
sysrgb clrWindow
sysrgb clrWindowText
sysrgb clrBtnFace
sysrgb clrBtnTextcolors =@ syscolors.new()
clrWindow =@ colors.getsyscolor(COLOR_WINDOW)
clrWindowText =@ colors.getsyscolor(COLOR_WINDOWTEXT)
clrBtnFace =@ colors.getsyscolor(COLOR_BTNFACE)
clrBtnText =@ colors.getsyscolor(COLOR_BTNTEXT)
end function colorsAnd then do I also have to have a sma for the Constants, like
// Windows System Colors
constant COLOR_SCROLLBAR 0
constant COLOR_BACKGROUND 1
constant COLOR_ACTIVECAPTION 2
constant COLOR_INACTIVECAPTION 3
constant COLOR_MENU 4
constant COLOR_WINDOW 5
constant COLOR_WINDOWFRAME 6
constant COLOR_MENUTEXT 7
constant COLOR_WINDOWTEXT 8
constant COLOR_CAPTIONTEXT 9
constant COLOR_ACTIVEBORDER 10
constant COLOR_INACTIVEBORDER 11
constant COLOR_APPWORKSPACE 12
constant COLOR_HIGHLIGHT 13
constant COLOR_HIGHLIGHTTEXT 14
constant COLOR_BTNFACE 15
constant COLOR_BTNSHADOW 16
constant COLOR_GRAYTEXT 17
constant COLOR_BTNTEXT 18
constant COLOR_INACTIVECAPTIONTEXT 19
constant COLOR_BTNHIGHLIGHT 20// #if(WINVER >= 0x0400)
constant COLOR_3DDKSHADOW 21
constant COLOR_3DLIGHT 22
constant COLOR_INFOTEXT 23
constant COLOR_INFOBK 24// #if(WINVER >= 0x0500)
constant COLOR_HOTLIGHT 26
constant COLOR_GRADIENTACTIVECAPTION 27
constant COLOR_GRADIENTINACTIVECAPTION 28// #if(WINVER >= 0x0510)
constant COLOR_MENUHILIGHT 29
constant COLOR_MENUBAR 30
constant COLOR_LAST 30
constant COLOR_DESKTOP 1
constant COLOR_3DFACE 15
constant COLOR_3DSHADOW 16
constant COLOR_3DHIGHLIGHT 20
constant COLOR_3DHILIGHT 20
constant COLOR_BTNHILIGHT 20JD KromkowskiParticipantQuestion:
JD KromkowskiParticipant1. Thanks alot.
2. By the way, there is a bug in the Personal Form Builder.
A. Create a button with a bitmap on it.
B. But then double click it in an effort to change its properties (like
the associated functions). The whole thing shuts down.So now the only way to make a change in Form Builder is to delete the
thing and start all over.3. In addition, I think that this is less a bug than something that hasn't
been completed. Or I don't know where to look. Or I think there is
something automatically happening and I want to make sure my assumption is
correct.)If you create a button with or without a bitmap, you can specify, e.g., a
function to associate with on clickBut you can't really specify a reference.
E.g.
snip
fc.onclick.function =@ Details
fc.onclick.reference =@ f
snipWhat I've come to understand by looking at the code generated by save as
dataform, is that a reference to "the form" in this case f is made
automatically.I am correctly understanding this? But I there isn't any possibility to
make the reference to anything else. Not that I have such a desire, but I
suppose that somebody might want to have the reference not be to the form
but to an application type.JDK
JD KromkowskiParticipantOK. Here is a better example of what I was trying to do, and my path of
confusion.function main()
integer error; error = 0
string filename; filename = "C:SIMPOLFormsMyForm.sxf"
string errtext; errtext = ""dataform1 f
f =@ opendataform1(filename, error=error, errortext=errtext)// select a record here
// f.selectlast()
sbme1table table
sbme1record r
sbme1field field
table =@ f.mastertable.table
r =@ table.select()
field =@ table!TheField
string test
test = r.get(field)
end function testI thought this sort of worked, until I realized that this is not giving me
the current record (i.e. the "current" record in terms of what the form is
showing).It seems to only be giving me the field value I am after for the first
record.So, if at // select a record here//, I have
f.selectlast()test still give me TheField value for the first record.
Why is that? I am guessed it has something to do with the line
r =@ table.select()
In other words, I am setting r to "point" at the first record even though
the f is "pointing" to the last record by virtue of f.selectlast().Then, I asked myself what is that masterrecord thing all about? So my new
working example is as follows:function main()
integer error; error = 0
string filename; filename = "C:SIMPOLFormspayroll1c.sxf"
string errtext; errtext = ""
dataform1 f
f =@ opendataform1(filename, error=error, errortext=errtext)//
//f.selectfirst()
//f.selectlast()
//f.selectnext()
// etc.
//
sbme1table table
sbme1record r
sbme1field field
table =@ f.mastertable.table
r =@ f.masterrecord.record
field =@ table!TheField
string test
test = r.get(field)
end function testSo having figured this all out (which works), it is now clear, all I
actually needed to do is this.string test
test = f.masterrecord.record.get(f.mastertable.table!TheField)Of course, this example presumes that TheField is a string.
JD KromkowskiParticipantJDK >> test = f.whatdoIuse!FULLNAME
>>
>> // this is check to see if I've done it correctly
>> wxmessagedialog(message = me.name,captiontext = test)
>>
>> //ETC. end function
>>NR> The easy way would be to add db1util to your project, and then use
> fieldval2string().Well, yes I saw this function as part of formlib and had intended to
eventually use it. But I am still going to need to be able to
determine/get/establish the current record.I want to do this in terms of the dataform1 f.
But something like this doesn't work.r =@ f.selectcurrent()
I suppose what I really need to do is Tablevar.selectcurrent()
test = r!FULLNAME
JD KromkowskiParticipantFiguring out the value of a field on the current record has always
been pretty straightforward in SBREQUEST YourField
or
REQUEST YourField.YourFileSo how do I do it in SIMPOL
function Details(type(*) me, dataform1 f)
// f is the current form and obviously works
// with various select statements
// e.g. f.selectfirst(error=e)if me.type == wxmenuitem
string test
test = "TESTING TESTING"
wxmessagedialog(message = me.name,captiontext = test)//Here I want to determine the value of a
//field FULLNAME on the current record and
//then pass it as string to variable test
//for sake of ease this field is a string so
//I don't need to manipulate/transform it
//with .tostr()
//I thought something like thistest = f.mastertable.record!FULLNAME
//I've tried other variation using f.masterrecord.etc
//without successtest = f.whatdoIuse!FULLNAME
// this is check to see if I've done it correctly
wxmessagedialog(message = me.name,captiontext = test)//ETC.
end functionJD KromkowskiParticipantI am using the web based thing in the Forum rather than thunderbird and I
see weird line breaks (two lines get put into one).JD KromkowskiParticipantUnfortunately, I am a dingbat unable to follow the instructions in the
readme.txt. I followed directions I think and then tried to openC:simpolutilitiessimpolserveradrb.sbm
as ppcs type in "Personal" as a test. Error 48 getting tables.
As to "just switching the types from sbme1table to type(db1table) and then
the code will work for both sbme1table and ppcstype1file."I really don't know what that means in the context of what I am doing.
At this stage of the game I am not doing anything. I am just opening up
forms,
e.g.:dataform1 f
string filename
filename = "C:SIMPOLFormsmyform.sxf"
string errtext; errtext = ""
f =@ opendataform1(filename,error=error,errortext=errtext)JDK
> JDK wrote:
>> ok back to drawing board. is there a conversion app(in simpol or
>> elsewhere) that converts sbme table to ppcs table?Neil Robinson wrote:
> It's the same file. Just use the simpolserver.smp in
> (Utilitiessimpolserver). All you need is a config file (a sample is
> there to work from. See the readme.txt for details. Then just use the
> ppcstype1 objects. For most things not related to table creation and
> management, you can just switch the types from sbme1table to
> type(db1table) and then the code will work for both sbme1table and
> ppcstype1file.
> Ciao, NeilJD KromkowskiParticipantBy the way what is the deal with formating in this forum.
I seem to be losing my "line integrity".
JD KromkowskiParticipantAs to the second part of your post:
Here is what I did:
dataform1 f
string filename
filename = "C:SIMPOLFormsmyform.sxf"
string errtext; errtext = ""
f =@ opendataform1(filename,error=error,errortext=errtext)What you want me to do is
A. open the datasource(s) and table(s) AND then
B. pass in opendatform1(all of that other stuff like datasource and
tables)I will acknowledge that in SB2 I do first open the databases(tables) I'll
be using and then open the form.But I sort of feel like WHY? Once I've created a form in Personal and
saved it as an .sxf shouldn't all of that stuff be accessible through f
which is created via opendataform1.Wouldn't it be logical that
form object f must already contain references to the datasource and the
mastertable otherwise I would be able to open the doggone thing up and see
the correct data.Why do I need to pass it when I am already passing it through the .sfx
information? - AuthorPosts