Forums › Forums › SIMPOL Programming › dataform1
- This topic has 9 replies, 2 voices, and was last updated 13 years, 5 months ago by JD Kromkowski.
- AuthorPosts
- November 11, 2010 at 10:17 pm #63JD KromkowskiParticipant
I created a form in Personal using a ppcstype1 datasource. I saved the form as dataform1 propram. I am still feel my way through this. This line below causes error. object not found error 21. when I try to run the code in IDE. sbme =@ sbme1.new(“127.0.0.1:4000”, “O”, error=e) I have simpolserver running. The form that was saved as program opens fine in Personal. If instead of running the form code I just do this f =@ opendataform1(filename, error=e, errortext=errtext) The form will open but no data is displayed.
November 18, 2010 at 8:51 pm #1468MichaelKeymasterOn 11/11/2010 22:17, JDK wrote:
> I created a form in Personal using a ppcstype1 datasource.
>
> I saved the form as dataform1 propram.
>
> I am still feel my way through this.
>
> This line below causes error. object not found error 21. when I try
> to run the code in IDE.
>
> sbme =@ sbme1.new("127.0.0.1:4000", "O", error=e)The above is a bug in the code generation. It should not be using sbme
and sbme1. I will have a look at the source code generator. It should
look like:ppcs =@ ppcs.new("127.0.0.1:4000", error=e)
Ciao, Neil
November 18, 2010 at 9:30 pm #1848JD KromkowskiParticipantNeil Robinson wrote:
> ppcs =@ ppcs.new("127.0.0.1:4000", error=e)
OK, this is what I thought. But I'm still never sure whether something is
a bug or something is something that I don't understand.So in the MyForm.sma sbme should be replaced everywhere by ppcs. Correct?
But this is more complicated because, e.g.
table =@ ppcs.opentable("EMPLOYEE", recordidfieldname="recid_ro_internal",
error=e)This won't work because ppcs doesn't have opentable as "method" (right
word?)Is this, below, what I need to do?
f =@ ppcs.openudpfile("127.0.0.1:4000",
"EMPLOYEE", error=iErrnum)But what I don't understand is why when I simply use
f =@ opendataform1(filename, error=e, errortext=errtext)
instead of calling generated MyForm.sma, it still fails in the IDE, but
succeeds in Personal. See dataform1 project example, which fails on this
form which works fine in Personal.Are there two different formlib? (One being used in Personal and one
available in IDE from formlib? I noticed opendataform1fromstring(). How
is this different opendatafrom1()JDK
November 19, 2010 at 4:01 pm #1431MichaelKeymasterOn 18/11/2010 21:30, JDK wrote:
> Neil Robinson wrote:
>
>> ppcs =@ ppcs.new("127.0.0.1:4000", error=e)
>
> OK, this is what I thought. But I'm still never sure whether
> something is a bug or something is something that I don't
> understand.
>
> So in the MyForm.sma sbme should be replaced everywhere by ppcs.
> Correct?
>
> But this is more complicated because, e.g.
>
> table =@ ppcs.opentable("EMPLOYEE",
> recordidfieldname="recid_ro_internal", error=e)
>
> This won't work because ppcs doesn't have opentable as "method"
> (right word?)
>
> Is this, below, what I need to do?
>
> f =@ ppcs.openudpfile("127.0.0.1:4000", "EMPLOYEE", error=iErrnum)
>
>
> But what I don't understand is why when I simply use
>
> f =@ opendataform1(filename, error=e, errortext=errtext)
>
> instead of calling generated MyForm.sma, it still fails in the IDE,
> but succeeds in Personal. See dataform1 project example, which fails
> on this form which works fine in Personal.It shouldn't succeed in Personal but fail in the IDE. Personal uses the
same code.> Are there two different formlib? (One being used in Personal and one
> available in IDE from formlib? I noticed opendataform1fromstring().
> How is this different opendatafrom1()opendataform1fromstring() and opendataform1fromfile() were added and
both use the same basic code. This was added to allow the pasting of
controls from the clipboard, which are stored as a complete SIMPOL form
file.For the correct code, see the sourcegen.sma file around line 438. The
problem is that the test is checking for:if src.datasource.type =@= ppcstype1file
and it should be checking for:
if src.datasource.type =@= ppcstype1
This fix will be in the next release.
Ciao, Neil
November 19, 2010 at 7:49 pm #1850JD KromkowskiParticipantNeil Robinson wrote:
>> JDK: But what I don't understand is why when I simply use
>>
>> f =@ opendataform1(filename, error=e, errortext=errtext)
>>
>> instead of calling generated MyForm.sma, it still fails in the IDE,
>> but succeeds in Personal. See dataform1 project example, which fails
>> on this form which works fine in Personal.> It shouldn't succeed in Personal but fail in the IDE. Personal uses the
> same code.Maybe I should qualify what I mean by fail.
In Personal the MyForm.sxf opens and the data is visible and I can move
from record to record.But in IDE using
f =@ opendataform1(filename, error=e, errortext=errtext)
the form opens but there is no data visible.
November 19, 2010 at 8:48 pm #1456JD KromkowskiParticipantJust so I'm clear.
Are you saying that this:
C:Program FilesSIMPOLProjectsexamplesdataformsdataformsdataforms.sma
Is essentially the same code used in Personal in so far as applies to
opening a form?And that a form that "works" in Personal should also work with
"dataforms.sma"?Because this is patently not true with my fairly simple form.
I think that it is pretty clear Personal has something the can handle a
form with ppcs datatype which dataforms.sma is missing.Are you sure that the formlib that is currently available is not some
older version?What is difference between formlib.sml and databaseforms.lib
November 19, 2010 at 9:59 pm #1381JD KromkowskiParticipantHow about this curious addition to problem which I think puts this on the
IDE.If I go to the actual .smp file in Explorer window
C:Program FilesSIMPOLProjectsexamplesdataformsbindataforms.smp
and "open with" smprun32 or with smpwin32
It all works fine!
This file
C:Program FilesSIMPOLProjectsexamplesdataformsbindataforms.smp
is 534 KB and was modified on 11/19/2010 4:43 pmbut this file (which DOES NOT work at all)
C:Program FilesSIMPOLProjectsexamplesdataformsdataformsdataforms.smp
is only 2KB and was modified on 11/19/2010 4:43 pmNovember 24, 2010 at 6:45 pm #1495MichaelKeymasterOn 19/11/2010 21:59, JDK wrote:
> How about this curious addition to problem which I think puts this on
> the IDE.
>
> If I go to the actual .smp file in Explorer window
>
> C:Program
> FilesSIMPOLProjectsexamplesdataformsbindataforms.smp
>
> and "open with" smprun32 or with smpwin32
>
> It all works fine!
>
> This file
>
> C:Program
> FilesSIMPOLProjectsexamplesdataformsbindataforms.smp is 534 KB
> and was modified on 11/19/2010 4:43 pm
>
> but this file (which DOES NOT work at all)
>
> C:Program
> FilesSIMPOLProjectsexamplesdataformsdataformsdataforms.smp is
> only 2KB and was modified on 11/19/2010 4:43 pmAhhhh!! I see the problem. You are using the result of the compilation
of just the source. A quick explanation of the project directory structure:Assuming a project called foo:
foo – the project directory
foofoo.smj – the project file
foofoo.smw – the workspace file
foofoofoo.sma – the source code
foofoofoo.smp – the compiled source code
foobinfoo.smp – the final binary (including any linked *.sml files)The basic rule of thumb here is always retrieve your final program from
the "bin" directory. Only that copy has all the required libraries
compiled into it.Ciao, Neil
November 29, 2010 at 2:03 pm #1851JD KromkowskiParticipantNeil Robinson wrote:
> Assuming a project called foo:
> foo – the project directory
> foofoo.smj – the project file
> foofoo.smw – the workspace file
> foofoofoo.sma – the source code
> foofoofoo.smp – the compiled source code
> foobinfoo.smp – the final binary (including any linked *.sml files)1. I now understand the difference, but the final binary will not have the
name "foobinfoo.smp", it will have the name "foofoofoo.smp".2. Nonetheless, this does not explain the problem that the ppcs forms
will not properly execute or debug from the IDE. By properly, excute or
debug, I mean that while the form opens no data is visible.In other words:
A. Open ppcs form in Personal, fine.
B. Run .smp program which uses opendataform1(), fine.
C. Debug or Execute the same source which compiles into B. in the IDE and
the form opens, but no data is visible.You can easily test this by debugging or executing the dataform example
project in the IDE and choosing a form which uses ppcs datasource.This did not happen in v 1.3.
JDK
November 29, 2010 at 10:25 pm #1637JD KromkowskiParticipantOK now this problem has gone away!
I did change some firewall settings and was prompted to block or unblock
the IDE (I unblocked) and allow once or allow always the IDE. I allowed
always.And now the form works in IDE.
- AuthorPosts
- You must be logged in to reply to this topic.