Forum Replies Created
- AuthorPosts
- JD KromkowskiParticipant
Alas, Personal is not open.
The files listed in the .cfg are valid. I can open them in Personal and
I have reorganized them.Any other ideas?
JD KromkowskiParticipantTwo cents or less.
Detailblocks, to me, are first about the DISPLAY of data.
So the first thing is the sorting of the children. The data-aware grid
totally fails at this. For example, if I have a bunch of records
representing dates that are linked to the master by some unique id, I'd
want to display that detailblock in date order. Right now you can't do
that.By the emphasis on DISPLAY I also mean that the adding, modifying and
deleting of a record associated with a row, I think, needs to happen
separately via a dialog/form.To that end, I always make the detail blocks READ ONLY and I always have
an "Add" button and a "Modify/Delete" button under the detail block. The
Add button brings up a dialog/form on which I can add a record. The
Modify/Delete button brings up a Requester (I suppose in simpol a dropdown
in a form/dialog) by which one can select (sometimes using a search like a
drilldown is necessary) a record to be modified or deleted (via
form/dialog). After all it is often the case that you can't show all of
the records in detailblock.So to me, the presence of an Add button and a Modify/Delete button really
should be incorporated right into the detailblock as a option, like a
parameter to have a scroll bar or not.When the detailblock records refer to externals (images or documents),I
still like using the invisible button. You are really not doing anything
to the row/record "selected", but are using some data in the row/record to
open up the image or document (e.g., PDFs, TIFFs, BMPs, Word or
WordPerfect) in its native program usually via ShellExecute.In the data-aware grids, it's kind of odd that there is no onSelectRow
event nor an onSelectColumn.Think about it. If you click on the row number, all of the row gets
"selected" or at least it "appears to get selected" because of the color
change.The same is true when you click on the column head, the entire column gets
"selected" or "appears to get selected".If the entire row is getting selected then should you be able to use that
to select that particular record.And if the entire column is getting selected then it seems like it should
be standard behavior that that would sort the records by that field.
First click ascending, next click the opposite sort, i.e. descending. (Or
you could handle it like googledocs spreadsheet.Just adding these behaviors (OnSelectRow and OnSelectColumn to the
data-aware grid would make them useful enough to use in lieu of a one
level detail block. (That and being able to adjusted the size of the row
numbers, way too wide now.)JD KromkowskiParticipantOk. This particular problem solved. I forget or didn't remember that the
sma-s that make up the application lib were there.Once I removed the include to the application framework library (sml) and
then added an include to the directories where the sma s were and then an
include line for the application.sma,I could debug step by step and see
the whole thing working. Infinitely more useful that way, in my opinion,
than just hooking up the application framework sml but having the source
hidden.On one hand, I have maintained for 15 years that I am not a programmer but
a lawyer. On the other hand, I have been fooling around with the stuff
(as well as other languages) for over 15 years. So you I think that I not
totally a dingbat.Your application framework while robust, thoughtful and capable of
handling a wide variety of generic situations is quite frankly way too
complicated for a novice programmer. I can follow it fine, (15+ years or a
blind squirrel finding a nut) but it really doesn't have to be so
complicated. So there is a question of your audience to consider.A. No real knowledge of programming.
B. Some basic knowledge and understanding of programming but who are
primary in different fields but who are adventurous enough to want to have
a go at creating their own applications.C. Programmers.
I suppose I fall somewhere between B and C
With respect to group A, of course one could create a wizard that would
just push stuff into the right places (what form are you using?, what
table?, do you want a menu?, what push buttons do you want on your form?,
etc.) without the end user even understanding what is going on, but you
aren't anywhere near building such a thing, it seems to me. On the other
hand, it also seems to me that you built the application framework with
perhaps a wizard in mind down the road.With respect to group B, I really think that the application framework too
complicated. I've been working on something far more simple which requires
an ability the create datasource(s) and table(s). This is pretty
straightforward in personal or by importing (still buggy though). And the
ability to create forms using the form designer. Also pretty
straightforward.Instead of throwing around the application, I throw around the dataform1.
Because, it after all it has all of the information necessary in it. If
there were anybody in this forum I'd upload the idea. But as there have
been only 7 downloads of v1.22, you can appreciate my concern about where
this is headed.With respect to group C, well they don't need your application framework,
although if they are programmers they probably don't want to invent the
wheel and will shameless crib from it.My thoughts and thank you again for the responses.
JD KromkowskiParticipantWell, I really wanted to see it at a level above or below (depending on
your perspective) resorting to using the appframework. This is why I
simplified the code way down. (Yes, even taking out error checking
aspects.) I want to see how you do it using formlib.sml and basic SIMPOL.So other than adding CONSTANTS, I want to see how you'd modify
function SimpleForm() to accomplish what is straightforward in SBL.
For example, I see this line in the sbair program:src =@ me.opendatasource("sbme1", "flight.sbm", appw, error=e)
but there is no way for me to really see what is actually happening when
opendatasource() is called.The same is true for
t =@ appw.opendatatable(src, "FLIGHT", error=e)So, I going to press you again:
In SBL:
>> OPEN FILE SHARE ,0"D:SB4WOFFICECASE"
>> OPEN FORM "D:SB4WFORMSMyForm.SBV"In SIMPOL, how would you modify function SimpleForm()?
constant PPCSRETRY 500000
constant PPCSTIMEOUT 6000000
constant PPCSTARGET "localhost:4000"
constant SBMTARGET "C:SIMPOLDataMyData.sbm"
constant TABLE1 "MyTable1"
constant TABLE2 "MyTable2"
// both tables reside in MyData.sbm
constant FORM1 "C:SIMPOLFormsMyForm.sxf"function main()
dataform1 f;
wxwindow w;
wxmenubar mb;
wxtoolbar tb
integer iErrnum;iErrnum = 0
w =@ wxwindow.new(10,10,990,638,captiontext="Caption ",error=iErrnum)
f =@ SimpleForm(iErrnum)
if w =@= .nul
string sResult
sResult = "Error number: " + .tostr(iErrnum, 10)
+ " opening main window{d}{a}"
else
w.onvisibilitychange.function =@ quit
//mb =@ CreateMainMenu(f)
//mb.setwindow(w)
//tb =@ CreateToolBar(f)
//tb.setwindow(w)
f.selectfirst()
f.setcontainer(w)
wxprocess(.inf)
end if
end functionfunction SimpleForm(integer error)
dataform1 f
string filename
filename = "C:SIMPOLFormsMyForm.sxf"
string errtext
errtext = ""
f =@ opendataform1(filename, error=error, errortext=errtext)
end function fNR: > It depends on whether you are using ppcs or not. The code is slightly
> different. Also, although the Superbase code looks easy, it actually
> isn't, since there is no checking for failure in what you wrote. Also,
> since nothing is global in SIMPOL, you have to pass the information in.JDK: I left out error checking for failure for simplicity's sake. But
that would hardly make it that much more complicated if I added an IF …
EXISTS line. And the no globals is really a red herring, I am perfectly
able to pass whatever I need to pass.JDK
JD KromkowskiParticipantYou've suggested the following:
1. Open the datasource and tables to be used
2. Open the formIn SBL this is pretty easy:
OPEN FILE SHARE "D:SB4WDATAMyTable.SBF"
OPEN FORM "D:SB4WFORMSMyForm.SBV"This is probably very easy but I want to make sure that I understand how
this would work in the most simple of terms. How would you modify below
to accomplish this. Where,datasource is "C:SIMPOLDataMyData.sbm"
tables used are "MyTable1" and "MyTable2"
and form is "C:SIMPOLFormsMyForm.sxf"function main()
dataform1 f;
wxwindow w;
wxmenubar mb;
wxtoolbar tb
integer iErrnum;iErrnum = 0
w =@ wxwindow.new(10,10,990,638,captiontext="Caption ",error=iErrnum)
f =@ SimpleForm(iErrnum)
if w =@= .nul
string sResult
sResult = "Error number: " + .tostr(iErrnum, 10)
+ " opening main window{d}{a}"
else
w.onvisibilitychange.function =@ quit
//mb =@ CreateMainMenu(f)
//mb.setwindow(w)
//tb =@ CreateToolBar(f)
//tb.setwindow(w)
f.selectfirst()
f.setcontainer(w)
wxprocess(.inf)
end if
end functionfunction SimpleForm(integer error)
dataform1 f
string filename
filename = "C:SIMPOLFormsMyForm.sxf"
string errtext
errtext = ""
f =@ opendataform1(filename, error=error, errortext=errtext)end function f
JD KromkowskiParticipantUpon further reflection, that was not the only problem for it not working.
I also tried to use df.height and df.width to set the innerwidth and
innerheight.But while a wxformvar.height and wxformvar.width are valid; interestingly
I don't see a valid analog dataform1var.height and dataform1var.widthYou have to drill pretty far down to get at that in a dataform1
f.controls.head.key.page.wxformpage.width
or
f.pages.head.key.wxformpage.widthin either case its pretty far down the line. I suppose something like this:
f.page[n].width
where n=page number
would be too simple?
JD KromkowskiParticipantOk, so I have been able to open up the same tables now on two separate
machines, using Personal as the test front end.I suppose there must be a programmatic way to find out the ip address
where the server is running, rather than manually using a cmd console and
ipconfig and then using pencil,paper, sneakernet configuration method!Opening the table using Person in record view worked fine for the test but
I started getting crashes when trying form views (I think this means you
need to have a form on each machine) but even trying to use Personal to
create forms in the multi-user configuration led to shutdowns. Here again
I can't tell if there is bug or if I am trying to do things that were
never intended.I think though I can see the light at the end of a tunnel. Certainly look
forward to seeing how detailblocks (multiline) will be implemented. The
data aware grid to me is a rather clunky looking substitute but I have it
working pretty well now that I've been able to just put the forms into a
wxdialog.(P.S., I still think it would make way more sense for each window to have
its own wxprocess, Egw1.wxprocess()
w2.wxprocess()I suppose using threading could be a way to do this.
While I can appreciate your application framework. I'd have to say that
the way I am approaching the problem(as a non-programmer) is, at least to
my way of thinking, quite a bit more parsimonious.JD KromkowskiParticipantOk, things are moving in a direction I understand.
Two more questions:
1. Why store locations in an INI? Why not in a Table? This is more a
philosophical question of programming?2. Can two machines use the same form. By that I mean the same file. Or
do you have to have copies on each machine. Is the actual .sfx being used
(on a continuous basis) or is it really just being read once in order to
create the form in a memory space. My thought is that it is the later
since I've run multiple instances of my program on the same machine both
referring to the single .sfx file. I suppose that this is the reason you'd
want to run code in the program to create the form rather than using
opendataform1(), because in the later case you would have to keep track of
how drives are mapped unless you had copies of the .sfx on each machine.JD KromkowskiParticipantI think it might have come down to fact that I didn't create the wxdialog
as invisible first.It seems to be working now.
JD KromkowskiParticipant> This will be the subject of a forthcoming chapter in the Quick Start Guide.
Well I look forward to this.
I can understand when you say you'd just put in "192.168.0.2:4000" (e.g.)
as the location when opening a datasource as a ppcstype in Personal (i.e.
instead of "127.0.0.1:4000"). Under those circumstances I can see (in
theory) how it might work.But the problem is that in the code I use I don't even "put in"
127.0.0.1:4000 to open a form as multi-user. I am just using code akin to://Loads the Main Form
function SimpleForm(integer error)
dataform1 f
string filename;
filename = "C:SIMPOLFormsMyPpcstypeForm.sxf"
string errtext; errtext = ""
f =@ opendataform1(filename, error=error, errortext=errtext)end function f
And in creating MyPpcstypeForm.sxf I don't even "put in" a location
(neither 127.0.0.1:4000 nor 192.168.0.2:4000)Here is how I've been creating the form.
1. I first create MySbmeForm.sxf. Then I close down Personal.
2. I then run simpolserver with a cfg that properly lists the table use in
MySbmeForm.sxf.3. I then restart Personal and open MySbmeForm.sxf. I choose Modify Form.
I then save the form as "MyPpcstypeForm.sxf".4. So now I have a multi-userform. My function SimpleForm() will only
work if simpolserver is running and I can open more than one instance of
the form on the Machine that has simpolserver running as one would expect.But if I go to another machine on the network, I can't open that
MyPpcstypeForm.sxf.a. Do I need to have more than one copy of MyPpcstypeForm.sxf? (one for
each machine?)
b. I still can't figure out how the second machine would know the port
was 198.168.0.2:4000. Since that was never identified during any part of
the process.In fact, if inspect the form, I see:
<datasource>
<sourcetype>ppcstype1</sourcetype>
<source>127.0.0.1:4000</source>
<sdf1table master="y">MYTABLE1</sdf1table>
</datasource>Do I have to go in and manually change that to
<datasource>
<sourcetype>ppcstype1</sourcetype>
<source>198.168.0.2:4000</source>
<sdf1table master="y">MYTABLE1</sdf1table>
</datasource>JD KromkowskiParticipantLet's say I want to run SBAIR (or something like it) on a network. Won't I
need to have simpolserver running on each workstation?I guess I confused about how this would work.
network
Workstation A
Workstation B
Workstation CIn order to "share" the data, are you suggesting that I only need to have
simpolserver running on one of the machines? I don't see how that works.In SB2, in order to a have a multiuser desktop application, I need to have
the lan installed which creates a ini unique to each machine that gets
everything pointed to the correct superbase.net file AND I have to make
sure to open the data as SHAREd, not exclusive. That happens on every
machine.I have not gotten so far to try to run what I have written in SIMPOL on
multiple machines, although I have gone as far as opening up multiple
instance of it on the same machine which seems to work fine, so a change
to data in instance 1 shows up on instance 2. no problems.I can already forsee issues (not insurmountable) with mapping the correct
name of the drives.I don't think there is actual documentation on how to do this, is there?
JDK
Neil Robinson wrote:
> I think the more important thing to consider, is do you want to have
> that code inside the application? The server would normally be running
> on a completely separate machine, so trying to run it locally if you
> can't find it isn't necessarily going to help. Especially if this code
> is on every user's machine. Even using PPCS with Superbase, you would
> have had a completely separate instance of Superbase acting as the
> server somewhere. PPCS is essentially a client/server protocol for
> accessing ISAM databases.> To run an external command check out !execute().
> Ciao, Neil
JD KromkowskiParticipantSo that I am clear.
If you type in "8:00" it changes it to "8:00 am".
It is only if one adds the "am" that one gets the weird result.
JDK
> JDK wrote:
>> I think that there is still a problem.
>> >>
>> If I type in
>>
>> "8:00 am"
>>
>> it changes it to "12:00 am"
>>
>> Obviously, that's not what you intended.JD KromkowskiParticipantI think that there is still a problem.
If I type in
"8:00 am"
it changes it to "12:00 am"
Obviously, that's not what you intended.
JDK
JD KromkowskiParticipantI have figured out why the "include"setting was not working. (Which by
the way doesn't work in any of the tutorial examples)If you take a look at Settings > and the "includes and libraries" tab,
you'll see
under the include foldersC:SIMPOLinclude
But this is wrong. It should be
C:SIMPOLinclude
How did I figure this out. I manually when and added the C:SIMPOLinclude
directory WITHOUT removing what was there. When you do this you will see
both entries and the difference the "" makes. Because now the projects
will build properly.My bill will be in the mail. 🙂
JD KromkowskiParticipantNeil Robinson wrote:
> No, the source to that library is also supplied. To debug into that,
> import the project into the addressbook project. To do this, right-click
> on the root node of your project in the project panel. Select "Import
> Modules from Project". Pick the appframework.smj from the file picker.
> Now you can debug into that source code as well.Ok, but "application.sma" has a red X through and I can't seem to find
that any place.Once, you import the modules, I can execute the program but I cannot debug
it at all (I am pretty sure this is because the program can't find
"application.sma"). - AuthorPosts