Skip to content

JD Kromkowski

Forum Replies Created

Viewing 15 posts - 211 through 225 (of 284 total)
  • Author
    Posts
  • in reply to: Understanding “Get” #1511
    JD Kromkowski
    Participant

    I've tried to pair this down to a version of the documentation
    (Object-Oriented Database Access Chapter 13), which works fine (so who
    knows):

    sbme1record r
    sbme1field fld
    string sResult
    integer c
    c = appw.form.mastertable.fieldinfo[]
    r =@ appw.form.masterrecord.record
    fld =@ r.table.firstfield
    while c > 0
    if fld.datatype =@= string
    sResult = fld.name + ": " + r.get(fld) + "{d}{a}"
    else if fld.datatype =@= integer or fld.datatype =@= date or
    fld.datatype =@= time
    sResult = fld.name + ": " + .tostr(r.get(fld), 10) + "{d}{a}"
    else if fld.datatype =@= number
    sResult = fld.name + ": " + .tostr(.fix(r.get(fld), 100), 10) +
    "{d}{a}"
    end if
    fld =@ fld.next
    c = c -1
    end while

    in reply to: SBAIR Example Dates #1914
    JD Kromkowski
    Participant

    lookup()

    Tools for Converting SBL to SIMPOL
    Chapter 20. Moving from SBL to SIMPOL

    in Programmer's Guide

    I subsequently found it, although am not sure how to use it yet.

    By the way, I hate that there are 6 different help "documents":

    SIMPOL IDE Doc
    SIMPOL IDE Tutorial
    SIMPOL Language Ref
    SIMPOL Programming Guide
    SIMPOL Quick Start Guide
    SIMPOL Personal User Guide

    With exception of the Personal User Guide, why can't these all be in one
    thing. And why can't I get to them all from the IDE. I'm never really
    sure where I should be looking for things.

    On that note, why can't I get to Personal from a menu pick in the IDE.

    in reply to: SBAIR Example Dates #1623
    JD Kromkowski
    Participant

    Sorry this is sort of stream of consciousness:

    So, in fact, I don't need to 'focus' the table when I am switching forms,
    at all. I can actually add and modify records on either form. Things are
    working.

    The only "problem" is that the Table icon is fixed (now I understand what
    you meant) but in fact the indexes are not, they do change to the
    appropriate index for the mastertable of whatever form is loaded. So onec
    "solution" is probably just getting rid of that part of the Iconbar, since
    it actually serves no functionality in its current iteration. (Although,
    obviously the code exists and is fixable because it works properly in
    Personal.)

    So onto the next question: Simpol version of look-ups on forms.

    I added an Onchange to a field on a form, called LookUp().

    It's not clear to me how in Personal, I could add a reference to the
    Onchange function. (Do I have to go in and edit the .sxf?)

    Then, I added this function to the end of the mainmenu.sma to test.

    function LookUp(type(*) me)
    string something
    something = "something"
    wxmessagedialog(.nul,message = something,captiontext =
    sAPPMSGTITLE,style = "ok", icon = "information", result = .nul)
    end function

    Then I changed to

    function LookUp(type(*) me)
    string sFullName
    integer iSSN
    sFullName =
    me.form.masterrecord.record.get(me.form.mastertable.table!FullName)
    iSSN = me.form.masterrecord.record.get(me.form.mastertable.table!SSN)
    wxmessagedialog(message = sFullName,captiontext = .tostr(iSSN,10))
    end function

    So I am having somewhat of a sense that there is light at end of tunnel.

    Any help on what a generic LookUp() function might look like in Simpol.

    I saw in documentation that there is a lookup() function purportedly in
    uisyshelp.sml but I don't see it.

    in reply to: SBAIR Example Dates #1588
    JD Kromkowski
    Participant

    Ok so I've been able (using SBAIR) to change back and forth between two
    forms
    (which were set as contstants).

    But the problem is "focusing" for lack of better word the table.
    Obviously, this can be done because it is happening in Personal.

    function ChangeForms(wxmenuitem me, type (application) app)
    appwindow appw
    appw =@ getappwindowfromwindow(getmenuitemwindow(me))
    if sSecondForm == appw.form.filename
    appw.openformdirect(sFirstForm,sAPPMSGTITLE)
    //how do I make sure the table is correct
    else
    appw.openformdirect(sSecondForm,sAPPMSGTITLE)
    //how do I make surec the table is correct
    end if
    end function

    in reply to: SBAIR Example Dates #1471
    JD Kromkowski
    Participant

    Now it seems to work? who knows.

    But since the table is now set at Passengr, how do you add a Flight?

    This is back to the problem I was trying to sort out before, opening up a
    new form – one that allows you to add a record in the Flight table.

    In what I was working on:

    I have an Employee table – lists of employees.
    I have a Wage table – basically a record for each they work (starttime and
    endtime)

    One Employee – many days worked (wages).
    One Flight – many passengers.

    The thought was a main form would be an employee record with a wage
    detailblock. (Although, ironically I don't actually do it that way now in
    Superbase, my mainform is the daily record and when I enter a daily
    record, I am using the Employee table/file to look up – name, ssn, rate
    and to add or modify an Employee – the mainform closes and the Employee
    form opens. But either way, this is the nut to crack – I tried one version
    with a modal dialog using a wxform as the input but then you have to have
    a routine to take that information and put it into a record, so why not
    just do it with a dataform.)

    in reply to: SBAIR Example Dates #1437
    JD Kromkowski
    Participant

    But never of these fixes, enables you to search by FlightDate.
    FlightDate is a field of the "Passenger" table not the flight table.

    Amazingly, Flight table does not have a FlightDate field!

    Everthing now seems to be broken.

    maybe I was right

    me.passengr

    AND

    passengr in the application type.

    ??

    in reply to: SBAIR Example Dates #1549
    JD Kromkowski
    Participant

    JDK wrote:

    > Neil Robinson wrote:
    >> In sbair.sma, on line 310, change me.flight to me.passenger.

    > I think you mean

    > me.passengr

    Obviously I was wrong and you were right — because of the wag passenger
    is spelled in type?

    me.passenger =@ t

    JDK

    > Is there a switch to see line numbers?

    > type sbairapplication (application)
    > reference
    > application __app resolve
    > type(db1table) passenger
    > type(db1table) flight
    > end type

    > should this really be "passengr"

    > And why "flight" and "passeng[e]r" instead of "FLIGHT" and "PASSENGER"

    > This is confusing to me since I had trouble opening up a table named
    > "wages" when I should have been opening "WAGES".

    in reply to: SBAIR Example Dates #1913
    JD Kromkowski
    Participant

    Neil Robinson wrote:
    > In sbair.sma, on line 310, change me.flight to me.passenger.

    I think you mean

    me.passengr

    Is there a switch to see line numbers?

    type sbairapplication (application)
    reference
    application __app resolve
    type(db1table) passenger
    type(db1table) flight
    end type

    should this really be "passengr"

    And why "flight" and "passeng[e]r" instead of "FLIGHT" and "PASSENGER"

    This is confusing to me since I had trouble opening up a table named
    "wages" when I should have been opening "WAGES".

    As to file and index combos, I've never used them (hard to believe I've
    been fooling around with this for 20 years and still don't know how to
    program). I hate the idea of someone search for "something" when the index
    was set to "somethingelse", so I've always explicited handled via a menu
    or buttons have "SEARCH by this thing" and "SEARCH by this otherthing".

    JDK

    in reply to: Simpol accessing internet #1912
    JD Kromkowski
    Participant

    What I am seeing is that every time I open a form with ppcs datasource
    whether in Personal or in IDE I get this message. (Of course, I am also
    getting error 10 message because I haven't run the simpolserver thing.) I
    am recalling that I had asked about this a long time ago. Does that sound
    right? I think I've duplicated it.

    in reply to: Incorrect dataform1text code output by savedf1program function #1584
    JD Kromkowski
    Participant

    I think the problem is worse that this. I don't think the save as
    dataform program is actually working at all. It's not creating a
    dataform1 program at all it's creating a wxform program.

    So "save as" "dataform1 program" and save as "wxform program" are doing
    the same thing, i.e. create a wxform program.

    in reply to: Variable Window #1909
    JD Kromkowski
    Participant

    This didn't have anything to do with threads.

    Once I changed the variable names and started over things started working
    properly.

    I'm not sure where the variables and values are being temporarily stored
    but there was some kind of corruption.

    I'll keep an eye on this to see if it is reproduceable.

    JDK

    in reply to: Select by Indexed Dates #1849
    JD Kromkowski
    Participant

    This still appears to not work as one would think.

    1. Open a form with a date index.

    2. Choose the date field as the index.

    3. Use the select record ("?")

    4. Put in a date like "1/1/2010".

    You might as well be searching with the "0" that is there as a default.

    Upon further examination it looks like you have to (in you head, I guess)
    change
    "1/1/2010" to 733672.

    But I am not exactly sure that using the Julian number actually is doing
    it correctly. But although 733672 is "1/1/2010" I get taken to a record
    with the date of "12/22/2009", which I presume means that I need the
    Gregorian number.

    In either case, surely the way this should work is that when selecting a
    record by a date index, anyone should be able to put in date (1/1/2010 or
    Jan 1, 2010) and get the right record.

    in reply to: dataform1 #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.

    in reply to: Delete Page? #1852
    JD Kromkowski
    Participant

    Neil Robinson wrote:

    > The way in the interim is to open the
    > form file and delete that page block from the XML.

    Yes, I had already figured this out. In fact, sometimes it is easily just
    to edit the XML.

    in reply to: dataform1 #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

Viewing 15 posts - 211 through 225 (of 284 total)