Skip to content

dataform1

Forums Forums SIMPOL Programming dataform1

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #63
    JD Kromkowski
    Participant

    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.

    #1468
    Michael
    Keymaster

    On 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

    #1848
    JD Kromkowski
    Participant

    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.

    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

    #1431
    Michael
    Keymaster

    On 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

    #1850
    JD Kromkowski
    Participant

    Neil 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.

    #1456
    JD Kromkowski
    Participant

    Just 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

    #1381
    JD Kromkowski
    Participant

    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 pm

    #1495
    Michael
    Keymaster

    On 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 pm

    Ahhhh!! 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

    #1851
    JD Kromkowski
    Participant

    Neil 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

    #1637
    JD Kromkowski
    Participant

    OK 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.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.