Skip to content

Jean Vallee

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 71 total)
  • Author
    Posts
  • in reply to: eliminating dup functions #2189
    Jean Vallee
    Participant

    On 3/19/2013 3:56 PM, Neil Robinson wrote:
    > On 10/03/2013 06:43, JV wrote:
    >> I know I have some variables declared that I truly did not use. My QA
    >> guy will start looking over the code in a week or so and that's one of
    >> the items on his list.
    >>
    >> I know I have some dup functions cuz I added libraries as I thought I
    >> needed them not knowing which compiled libraries had what functions in
    >> them. The sml's and sma's do not match, like appframework has ABS,
    >> DATESTR in the sml but not in the sma.
    >>
    >> Maybe that's something else to give to my QA guy…it should be
    >> documented but…
    >
    > Hi Jean,
    >
    > If you are using the appframework, then a huge number of the libraries are already included. If you then are including various
    > source files from those libraries into your project, that can cause the problem that you are seeing. We are currently looking into
    > a program that will generate a hierarchical list of which libraries are included in other libraries. That would be easier than
    > trying to maintain that sort of documentation by hand.
    >
    > Ciao, Neil
    >
    That will be helpful…

    in reply to: problem with displaying form #2190
    Jean Vallee
    Participant

    On 3/19/2013 4:05 PM, Neil Robinson wrote:
    > On 10/03/2013 07:27, JV wrote:
    >> I had the same problem as John back on 2/13/13 with form not displaying
    >> properly. Made the change that Neil posted and it solved the problem
    >> UNTIL I HIT APP.RUN
    >>
    >> Scrn1 is sitting on the line just before app.run and Scrn2 is after it
    >> executes app.run.
    >>
    >> What else can I try?
    >
    > Not sure what is happening here. I see a blank area at the bottom of the form, but it is not obvious what is causing it to be
    > overwritten.
    >
    > Ciao, Neil
    >
    I dd not always have the problem. I had a bigger blank band that showed
    up about a month ago and I added the code you posted back in Feb. Now
    it's only a 1/4" band. It does not always happen on the initial form
    but it always show up by the 3rd form opened with openformdirect.

    I can email you a copy at some point if nothing comes to mind as to what
    is wrong.

    This is not a showstopper at this point but will be when I start beta
    testing in a month or so.

    in reply to: Mod function yet? #2188
    Jean Vallee
    Participant

    On 3/15/2013 12:11 PM, kromkowski wrote:
    > checkneedsave ?
    >
    > On 03/13/13 3:35 PM, JV wrote:
    >> I've been looking for a way to tell if a record has changed since it was
    >> last saved and came across this in the docs:
    >>
    >> At some point when data-aware forms have been added there may be a
    >> method to indicate if any record on the form has been modified since it
    >> was read. That would be the appropriate location for such functionality.
    >>
    >> Did this ever come about?
    >>
    >> Jean
    >
    of course! All I could think of was isdirty and I knew that would not work.

    I still have SB mindset so automatic translation is not there yet for me.

    And thanks to all who are patient with me asking basic questions.
    I try very hard not to, but sometimes I get stuck and have no one to
    bounce it off of.
    Jean

    in reply to: me!controlname not found #2185
    Jean Vallee
    Participant

    On 3/13/2013 5:19 PM, JV wrote:
    > I get these sporadically
    >
    > plv_application app
    > app =@ appw.app
    > dataform1 me
    > me =@ appw.form
    > integer e ; e = 0
    > boolean ok ; ok = .true
    > type(dataform1control)fc ;// this always works
    > fc =@ me.findcontrol("SubDivCode") ;// can find it
    > // another example of not finding me!
    > // if me!SubDivCode == "" ;// but this doesn't always work
    > if fc.control.text == "" ;// so I do this
    > ok =@ SelPrmtSubDivOK(appw)
    > end if
    >
    > Any ideas?
    > Jean
    One additional note:
    This cropped up when the function was called thru an ongotfocus event.
    It worked fine when called from an onclick event.
    Jean

    in reply to: ERROR 65 why when get() works? #2180
    Jean Vallee
    Participant

    On 3/11/2013 4:11 PM, kromkowski wrote:
    > Any thoughts on this?
    >
    > On 03/06/13 5:19 PM, kromkowski wrote:
    >> I don't understand why I get error 65 trying to use ! operator instead
    >> of get()
    >> …
    >> type(db1record) rCLAIMS
    >> integer i
    >> sbme1table claims
    >> integer iID,iCMNo
    >> string sfield,sfield1
    >> e = 0; iCMNo = 0
    >> claims =@ app.CLAIMS
    >> appw =@ getappwindowfromwindow(getmenuitemwindow(me))
    >> rCLAIMS =@ appw.form.selectcurrent(claims.firstindex,error = e)
    >> // this next line works perfectly fine
    >> sfield = rCLAIMS.get(claims.firstfield)
    >>
    >> // here i am trying to get the exact same thing
    >> // I put the if test just to make sure I was spelling
    >> // the field name correctly
    >> if claims.firstfield.name == "CLMLASTNAM"
    >> // this next line throws error 65 – WHY?
    >> sfield1 = rCLAIMS!CLMLASTNAM
    >> end if
    >
    >
    Nice to know I'm not the only one who has encountered this.

    I too get error 65 on occasion when it makes no sense.

    I have to use something else to get past so I can keep coding.

    Jean Vallee

    in reply to: List box fomatting #1531
    Jean Vallee
    Participant

    On 3/10/2013 2:53 PM, Jim wrote:
    > Replace your listboxes with grids.
    >
    Never used a grid before but it looks like the answer. Once again, thanks!

    in reply to: eliminating dup functions #1723
    Jean Vallee
    Participant

    On 3/9/2013 12:42 PM, Jim wrote:
    > Oh…one other comment about compiler warnings.
    > .
    > Sometimes they are just plain wrong.
    > .
    > Thus as an example, the following segment of code:
    > .
    > array xinfo
    > xinfo =@ array.new()
    > .
    > ..and a few lines later, inside an if statement:
    > .
    > xinfo =@ blankrecord(app.fg.sg, "xinfo.sbm", "XINFO")
    > .
    > reliably generates the warning:
    > .
    > Warning: Variable declared and not used in the following line:
    > I:NewTPMPropMgrcomfcnlibcomfcnlibComfcns.sma(2891): array xinfo
    > .
    > I have maybe half a dozen cases like this in my code, which are clearly
    > wrong, aggravating to see every time, and absolutely not worth worrying
    > about.
    >

    I know I do not have any conflicts with supplied function names. The
    warnings are mostly : Type or function not declared in the following
    line… and are wrong. Most blatant example of a warning that is wrong
    is the one about the string variable I use to hold the result of a pick
    list:

    slctfromlist =@ displaylistbox(appw, listboxlist)

    It's saying slctfromlist is a problem, complains on every instance and I
    use that a lot. It even complained about .fix!

    I know I have some variables declared that I truly did not use. My QA
    guy will start looking over the code in a week or so and that's one of
    the items on his list.

    I know I have some dup functions cuz I added libraries as I thought I
    needed them not knowing which compiled libraries had what functions in
    them. The sml's and sma's do not match, like appframework has ABS,
    DATESTR in the sml but not in the sma.

    Maybe that's something else to give to my QA guy…it should be
    documented but…

    Thanks for the input!

    Jean

    in reply to: Head Scratcher. getting an incorrect result of a calc #1490
    Jean Vallee
    Participant

    On 3/9/2013 12:16 AM, Jim wrote:
    > Your .fix is wrong.
    > .
    > fix(number,denominator) is the syntax, where (per the docs) "The
    > denominator of the fraction to round to, for example the value 1000 will
    > cause rounding to three decimal digits. "
    > .
    > So your syntax should be sc = .fix(schrg*taxable,100).
    > .
    > As written, you are rounding to the nearest half, so 3.5 is actually
    > correct.
    >
    Got it! I thought I was crazy – I read the docs several times but didn't
    comprehend (Obviously!). Been writing SB code so long I'm having trouble
    switching over to new syntax.

    I'm sure I have this problem in other places. Thanks to your help, I can
    fix it it before I trip over it.

    THANKS AGAIN!
    Jean

    in reply to: Onlostfocus question #1503
    Jean Vallee
    Participant

    On 3/7/2013 1:31 PM, jim wrote:
    > The onlostfocus event will run whenever the control loses focus, no matter
    > how that happens. In fact, on some controls (particularly dropedit style
    > listboxes) it also incorrectly runs when the control gets focus or when a
    > change is made. You can't stop that from happening so to do what it is
    > you want to do you have to just deal with it.
    > .
    > You might want to look at the onmouse event handler. Force that handler
    > to run before any onlostfocus handler (either use a lock or set up some
    > appropriate timing delays), and have it set a flag if the mouse was
    > clicked. Your onlostfocus handler checks that flag, and if it is set,
    > does not run.
    > .
    > It will be up to you how to figure out how to reset that flag
    > afterward…maybe reset it in ongotfocus handlers.
    > .
    > Good luck with that, and if you come up with a reliable way to do it,
    > please share.
    >
    I figured something out about 4AM and have it working reliably. When I
    have a spare moment, I will copy the code and post.

    in reply to: IDE problem still #2172
    Jean Vallee
    Participant

    On 3/7/2013 2:05 AM, JV wrote:
    > On 3/7/2013 1:51 AM, JV wrote:
    >> After 18 hours I give up.
    >> I was just about to solve the last problem when the debugger gave me
    >> this:
    >>
    >> plv_application appSTR(VAL(me!feettl1.text,app.__app.SBLlocale………
    >>
    >> There is no such single line in the file.
    >>
    >> I of course have plv_application app at the top and the STR command is a
    >> couple of lines down within a separate statement.
    >>
    >> I can compile the document without error.
    >>
    >> What's so frustrating is that I did a rebuild after just a review and
    >> didn't actually need to.
    >>
    >> I'm going to reboot and hope that works.
    >>
    >> Jean Vallee
    >>
    >>
    > Update – reboot made no difference (shot in the dark)
    > Sooo. I commented out the entire function and it STILL reported that
    > same error.
    >
    > I doubled checked to make sure I didn't have it in more than one place
    > and anything else I could think of.
    >
    > I will have to start a new file and copy bit by bit over to get thru
    > this aggravation.
    >
    > Jean

    My bad.. I was only search the current file.. Somehow I had pasted a
    line of code at the top of main(). That's been stable so long I never
    check it.

    in reply to: IDE problem still #2171
    Jean Vallee
    Participant

    On 3/7/2013 1:51 AM, JV wrote:
    > After 18 hours I give up.
    > I was just about to solve the last problem when the debugger gave me this:
    >
    > plv_application appSTR(VAL(me!feettl1.text,app.__app.SBLlocale………
    >
    > There is no such single line in the file.
    >
    > I of course have plv_application app at the top and the STR command is a
    > couple of lines down within a separate statement.
    >
    > I can compile the document without error.
    >
    > What's so frustrating is that I did a rebuild after just a review and
    > didn't actually need to.
    >
    > I'm going to reboot and hope that works.
    >
    > Jean Vallee
    >
    >
    Update – reboot made no difference (shot in the dark)
    Sooo. I commented out the entire function and it STILL reported that
    same error.

    I doubled checked to make sure I didn't have it in more than one place
    and anything else I could think of.

    I will have to start a new file and copy bit by bit over to get thru
    this aggravation.

    Jean

    in reply to: IDE is aggrevating #2168
    Jean Vallee
    Participant

    On 3/6/2013 5:11 PM, kromkowski wrote:
    > What I have found (possible spurious, although as the bud light
    > commercial says "it's not weird if it works" which Neil may or may not
    > get), is that if you keep the cursor NOT over any part of the IDE window
    > when you rebuild/build (or when you debug and the IDE rebuilds for you)
    > the IDE does not crash.
    >
    > I've gone week without a crash.
    >
    > If it's not just dumb luck, then there is some kind of conflict between
    > a mouse trapping function in the IDE and the build functions.

    GREAT TIP!! THANKS!!!

    Also, I stumbled over the Document/Compile in the menu.. I have been
    working on this HUGE function and could not find the missing end if.

    I commented it all out then uncommented matching if / end if 's…
    Document / Compile only compiles the current file and WITHOUT ALL THE
    WARNINGS so it was just what I needed. I wasn't completely sure that's
    what's intended so I would do a rebuild every once in a while just to be
    sure. I spent all day debugging this so 30 secs of wait time while the
    debugger complains with each rebuild adds up to at least an hour a day
    of wasted time for me.

    in reply to: IDE is aggrevating #1579
    Jean Vallee
    Participant

    On 3/5/2013 11:05 PM, Jim wrote:
    > If you remember to do a "save all" after setting your breakpoints, then
    > they will be set when you restart the IDE after it crashes.
    > .
    > When compile time is getting to be too long, then it is time to break your
    > project up into separate libraries so that you don't have to recompile
    > every time. You might also consider the possibility of obtaining a faster
    > system to develop on.
    > .
    > Slow compiles on Simpol (although, I must confess, it was on a virtual
    > machine…and still is) was one of several factors that motivated my last
    > major hardware upgrade (almost exactly three years ago). Of course, since
    > I run Linux and only have Windows available in virtual machines, hardware
    > changes for me are a LOT easier than they are for you native Windows users.
    >
    > My project is presently broken up into 16 libraries. Compiles seldom take
    > more than 5 or10 seconds.
    >
    I got out of the habit of save all once I set the option to save before
    build…

    Compile itself only take a few seconds… it's the warnings that go on
    and on (30 sec at present)

    I will start to make libraries in about a month or so. I'm still
    building core stuff so I'm editing pretty much every file every day
    right now.

    in reply to: Need help with Error 22 #1700
    Jean Vallee
    Participant

    On 3/5/2013 6:20 PM, Jim wrote:
    > Sorry…typos…and I can't edit the previous message…
    > .
    > The code segment should say this:
    > .
    > Then you do this:
    > .
    > function mycancelfcn(type(wxformcontrol) me)
    > blah blah blah
    > end function
    > .
    > function myonvisibilitychangefcn(wxwindow me)
    > type(wxformcontrol) fc
    > if me._ !@= .nul
    > fc =@ me._.f.addcontrol(wxformbutton, left = 1, top = 1, width = 1,
    > height = 1)
    > fc._ =@ me._
    > mycancelfcn(fc)
    > end if
    > end function
    >
    >
    >
    Thanks for the tip! I just wrote 2 different function with the correct
    parameters but I like your idea!!

    in reply to: Need help with Error 22 #2158
    Jean Vallee
    Participant

    On 3/4/2013 4:04 PM, JV wrote:
    > On 3/4/2013 12:54 PM, Neil Robinson wrote:
    >> On 04/03/2013 15:40, JV wrote:
    >>> I am getting an unexplainable error 22
    >>> The IDE reports:
    >>>
    >>> Error (22): Local variable not dimensioned
    >>> Error: a statement of function "wxdialog.processmodal" was executed
    >>> unsuccessfully
    >>>
    >>> The d.processmodal(.inf) is in a function is called over and over again.
    >>> It creates a wxform d to hold various dialogs for users to make a
    >>> choice. Some dialogs have radio buttons and some have listboxes along
    >>> with an ok and cancel button. The dialogs all display and allow
    >>> selection correctly.
    >>>
    >>> This error is ONLY raised if a listbox in the dialog allows for multiple
    >>> selections.
    >>>
    >>> The error occurs immediately when the user clicks the OK button after
    >>> choosing multiple items on the listbox. It does it whether the user
    >>> selected one or selected multiple items on the list.
    >>>
    >>> I commented out the code that allows for multiple selection and the code
    >>> that fed the selected items into an array to make sure that the array
    >>> for the listbox items being fed to the dialog was correct.
    >>>
    >>> It works fine in single item select only mode although I'm pretty sure
    >>> that commenting the 2nd part about feeding the selected list items into
    >>> an array was not needed. It never gets there. The previous statement is
    >>> processmodal and that's where it crashes and burns.
    >>>
    >>> Any ideas how to fix this?
    >>
    >> Hi Jean,
    >>
    >> This may be crashing on the processmodal() because further down the line,
    >> in the code that handles the onclick event there is a problem. Have you
    >> passed a reference variable but not allowed for it in the parameter list
    >> of the function?
    >>
    >> Ciao, Neil
    >
    > The code is exactly the same for both single and multiple selection list
    > boxes.
    >
    > I have an:
    > if app.gsw == 120
    > … set selection to multiple
    > else
    > … set selection to single
    > end if
    >
    > within the function that creates the dialog.
    >
    > The selections made in the listbox are not even evaluated until after
    > processmodal so it should not matter how many there are.
    >
    > If app.gsw == 120 (allow multiple choices) I declare and initialize an
    > array to read them into else I declare a string to accept the single
    > choice immediately following processmodal.
    >
    > But I never get to it when multiple choice are allowed…
    >
    > Do I need to declare and initialize the array maybe before the dialog
    > function and its setting for allowing multiple choices?
    > I am going to try that… now that I put that idea in writing.
    >
    > Not intuitive but an option to try…
    >
    > Jean Vallee

    Apparently you cannot call the same function for both a cancel button
    and an wxdialog.onvisibilitychange.function…

    It would be very helpful if the error messages generated by the IDE were
    more verbose. Wrong type isn't very descriptive… It knows they don't
    match so why doesn't it tell you object x is a type xx while object y is
    a type yy. My 2 cents…
    Jean
    >
    >
    >
    >
    >
    >
    >
    >

Viewing 15 posts - 31 through 45 (of 71 total)