Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #12367 > unrolled thread
| Started by | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| First post | 2019-03-29 21:11 -0700 |
| Last post | 2019-04-08 11:23 -0400 |
| Articles | 12 — 6 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Passing Variables Jeff Rollo <jrollo64@gmail.com> - 2019-03-29 21:11 -0700
Re: Passing Variables Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2019-03-31 11:08 +0200
Re: Passing Variables Jeff Rollo <jrollo64@gmail.com> - 2019-03-31 03:05 -0700
Re: Passing Variables Jeff Rollo <jrollo64@gmail.com> - 2019-03-31 03:10 -0700
Re: Passing Variables Johan Nel <johan.nel@xsinet.co.za> - 2019-03-31 12:20 +0200
Re: Passing Variables Jeff Rollo <jrollo64@gmail.com> - 2019-03-31 05:22 -0700
Re: Passing Variables Johan Nel <johan.nel@xsinet.co.za> - 2019-03-31 15:38 +0200
Re: Passing Variables rolandgell.rg@gmail.com - 2019-04-08 03:55 -0700
Re: Passing Variables Jeff Rollo <jrollo64@gmail.com> - 2019-04-08 04:10 -0700
Re: Passing Variables Jeff Rollo <jrollo64@gmail.com> - 2019-04-08 04:13 -0700
Re: Passing Variables Chris Pyrgas <"chris (at)"@xsharp.eu> - 2019-04-08 14:28 +0300
Re: Passing Variables "Jamal" <nospam@example.com> - 2019-04-08 11:23 -0400
| From | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| Date | 2019-03-29 21:11 -0700 |
| Subject | Passing Variables |
| Message-ID | <9fe69513-5e9b-4d87-8f17-ab1329f5fbdc@googlegroups.com> |
Hi Again... :)
What am I missing? This code
//Job Number Search
ELSEIF Len(AllTrim(self:oDCSingleLineEdit1:CurrentText)) > 0
nOption := 5
oServer := DETAILS{}
oWin := JobNoRep{}
oWin:GoTop()
oWin:server:SetOrder("JobNumber", "DETAILS")
oWin:Seek(self:oDCSingleLineEdit1:CurrentText)
oWin := JobNoRep{,, (oWin:server), oWin:JOBNUMBER}
cName := oWin:FIELDGET(#CLNAME)
cTempServer := CLIENT{}
cCode := oWin:FIELDGET(#CLCODE)
cTempServer:Seek(cCode)
cName := cTempServer:FIELDGET(#CLNAME)
cCaption := AllTrim(cCode) + " - " + AllTrim(cName)
cTempServer:Close()
oWin:ClientName := cCaption
self:Owner:Owner:Owner:EndWindow()
oWin:Show(SHOWCENTERED)
self:EndDialog()
Produces a value of NIL00012 where "00012" could be any 5 digit Job number found in the database.
When I put a ?? uExtra to see that the variable is being passed correctly in the postinit of the JobNoRep form, it returns the NIL before the Job Number, and after several hours and attemots, I cannot for the life of me work out why. Any ideas please?
Thanks very much
Jeff
[toc] | [next] | [standalone]
| From | Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> |
|---|---|
| Date | 2019-03-31 11:08 +0200 |
| Message-ID | <5l01aep2fb1lg9s1vf4mj124fp1c17prtc@4ax.com> |
| In reply to | #12367 |
Jeff,
>What am I missing? This code
>
> //Job Number Search
> ELSEIF Len(AllTrim(self:oDCSingleLineEdit1:CurrentText)) > 0
> nOption := 5
> oServer := DETAILS{}
> oWin := JobNoRep{}
>
> oWin:GoTop()
>
> oWin:server:SetOrder("JobNumber", "DETAILS")
> oWin:Seek(self:oDCSingleLineEdit1:CurrentText)
> oWin := JobNoRep{,, (oWin:server), oWin:JOBNUMBER}
> cName := oWin:FIELDGET(#CLNAME)
> cTempServer := CLIENT{}
> cCode := oWin:FIELDGET(#CLCODE)
> cTempServer:Seek(cCode)
> cName := cTempServer:FIELDGET(#CLNAME)
> cCaption := AllTrim(cCode) + " - " + AllTrim(cName)
> cTempServer:Close()
> oWin:ClientName := cCaption
> self:Owner:Owner:Owner:EndWindow()
> oWin:Show(SHOWCENTERED)
>
> self:EndDialog()
>
>
>Produces a value of NIL00012 where "00012" could be any 5 digit Job number found in the database.
>
>When I put a ?? uExtra to see that the variable is being passed correctly in the postinit of the JobNoRep form, it returns the NIL before the Job Number, and after several hours and attemots, I cannot for the life of me work out why. Any ideas please?
>
>Thanks very much
>
>Jeff
first, i don't see any uExtra in your code.
second, i take it your "produces" is the value you put into cCaption?
third, if you see NIL later on, what returns your oWin:Fieldget?
Regards
Karl
[toc] | [prev] | [next] | [standalone]
| From | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| Date | 2019-03-31 03:05 -0700 |
| Message-ID | <c78788ae-c1ad-458a-b90c-cc72275f92b8@googlegroups.com> |
| In reply to | #12371 |
Hi Karl. The uExtra is the 4th parameter when I call jobinfo - oWin:JOBNUMBER as shown in my example
[toc] | [prev] | [next] | [standalone]
| From | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| Date | 2019-03-31 03:10 -0700 |
| Message-ID | <e9b5ab5b-514b-4ae8-a932-abb0d09461d3@googlegroups.com> |
| In reply to | #12372 |
As for points 2 and 3, cCaption is a caption for the window, completely unrelated to this issue. Point 3 owin:fieldget(#CLCODE) is, in my case here 000012
[toc] | [prev] | [next] | [standalone]
| From | Johan Nel <johan.nel@xsinet.co.za> |
|---|---|
| Date | 2019-03-31 12:20 +0200 |
| Message-ID | <q7q491$c2i$1@dont-email.me> |
| In reply to | #12367 |
Jeff,
On 2019/03/30 06:11, Jeff Rollo wrote:
> What am I missing? This code
> When I put a ?? uExtra to see that the variable is being passed correctly in the postinit of the JobNoRep form, it returns the NIL before the Job Number, and after several hours and attemots, I cannot for the life of me work out why. Any ideas please?
I think you missing that NIL is presenting some code that is incorrect
following the following pattern:
You have an index with expression pattern: FIELD 1 + JobNo, where JobNo
is the above JobNoRep field.
You basically trying to retrieve all records that match a Filter: Give
me all rows that match the expression FieldGets("<FieldList> +
Field->JobNo")
So here is my assumption, you have somewhere an invalid /non-existent
field (typo), and the Error trap pass back "NIL" instead of telling you
you have a bug.
By the way, why don't you post this on the XSharp forums?
HTH,
--
*Johan Nel*
Friend of XSharp (FOX)
https://xsharp.info
George, South Africa
[toc] | [prev] | [next] | [standalone]
| From | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| Date | 2019-03-31 05:22 -0700 |
| Message-ID | <3302ee34-74b7-42d8-95dc-6b6c3c911235@googlegroups.com> |
| In reply to | #12374 |
Thanks Johan. Didn't post in x# as this is a strictly VO thing. Didn't think it would help. Surely a typo in this context would throw a compile time error would it not? I've been all over the code, and can't see any. If I remove the ?? uExtra the NIL00012 goes away ie, both the NIL and the Job number. I don't get how one variable which is not an array, can return two values.
[toc] | [prev] | [next] | [standalone]
| From | Johan Nel <johan.nel@xsinet.co.za> |
|---|---|
| Date | 2019-03-31 15:38 +0200 |
| Message-ID | <q7qfsa$h53$1@dont-email.me> |
| In reply to | #12375 |
Jeff, X# now supports VO 2.8 99%. This NG is not really monitored by many people anymore, there is almost no activity. Post on the X# forum, you will see many people offering your help. Only Karl, Wolfgang, a handful and I are still monitoring here... It might be that the VO runtime catch the error, that is why you don't see anything. Johan. On 2019/03/31 14:22, Jeff Rollo wrote: > Thanks Johan. Didn't post in x# as this is a strictly VO thing. Didn't think it would help. > > Surely a typo in this context would throw a compile time error would it not? I've been all over the code, and can't see any. > > If I remove the ?? uExtra the NIL00012 goes away ie, both the NIL and the Job number. I don't get how one variable which is not an array, can return two values. -- *Johan Nel* George, South Africa
[toc] | [prev] | [next] | [standalone]
| From | rolandgell.rg@gmail.com |
|---|---|
| Date | 2019-04-08 03:55 -0700 |
| Message-ID | <a8f026bd-a978-4772-b0ee-e3e6cef139f2@googlegroups.com> |
| In reply to | #12367 |
Hi Jeff, i am not a fullstack vo - developer, but i propose to use
oWin:server:fieldget(#)
BR Roland
Am Samstag, 30. März 2019 05:11:55 UTC+1 schrieb Jeff Rollo:
> Hi Again... :)
>
> What am I missing? This code
>
> //Job Number Search
> ELSEIF Len(AllTrim(self:oDCSingleLineEdit1:CurrentText)) > 0
> nOption := 5
> oServer := DETAILS{}
> oWin := JobNoRep{}
>
> oWin:GoTop()
>
> oWin:server:SetOrder("JobNumber", "DETAILS")
> oWin:Seek(self:oDCSingleLineEdit1:CurrentText)
> oWin := JobNoRep{,, (oWin:server), oWin:JOBNUMBER}
> cName := oWin:FIELDGET(#CLNAME)
> cTempServer := CLIENT{}
> cCode := oWin:FIELDGET(#CLCODE)
> cTempServer:Seek(cCode)
> cName := cTempServer:FIELDGET(#CLNAME)
> cCaption := AllTrim(cCode) + " - " + AllTrim(cName)
> cTempServer:Close()
> oWin:ClientName := cCaption
> self:Owner:Owner:Owner:EndWindow()
> oWin:Show(SHOWCENTERED)
>
> self:EndDialog()
>
>
> Produces a value of NIL00012 where "00012" could be any 5 digit Job number found in the database.
>
> When I put a ?? uExtra to see that the variable is being passed correctly in the postinit of the JobNoRep form, it returns the NIL before the Job Number, and after several hours and attemots, I cannot for the life of me work out why. Any ideas please?
>
> Thanks very much
>
> Jeff
[toc] | [prev] | [next] | [standalone]
| From | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| Date | 2019-04-08 04:10 -0700 |
| Message-ID | <f7c00330-ea83-478c-b0a0-4c4034257e4a@googlegroups.com> |
| In reply to | #12405 |
Thanks Rpland. I did try that but got the same result...
[toc] | [prev] | [next] | [standalone]
| From | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| Date | 2019-04-08 04:13 -0700 |
| Message-ID | <e4fca5d8-4bcb-46fd-ac89-cc8c46ec8103@googlegroups.com> |
| In reply to | #12405 |
Thanks Roland. I did try that but got the same result...
[toc] | [prev] | [next] | [standalone]
| From | Chris Pyrgas <"chris (at)"@xsharp.eu> |
|---|---|
| Date | 2019-04-08 14:28 +0300 |
| Message-ID | <q8fb6g$2bc$1@gioia.aioe.org> |
| In reply to | #12367 |
Hi Jeff,
Where is it that you see the "NIL00012", is it somewhere in your window,
or is it in the console where you print it? Note that if you use "??" in
order to print to console, then there's no new line added, the text will
be appended to anything was written before. So maybe you had printed
first a value that was NIL, then printed the correct value of 00012, so
as a result you got NIL00012 when printing one after the other? In order
to avoid such issues, better always use ? instead of ?? to print to console.
If that's not the problem, then please post some more code, we need to
see exactly what you are doing, where it is that you print the value and
where, etc. Also, not sure if the flow of your code is as intended, you
are creating a window and assign it to a var (oWin), but then, without
showing that first window, you are creating another instance of the same
window and assign it again to the same var. I think there's a code flow
problem here, what was your intended behavior you wanted to create?
Chris/X# devteam, although I will not preach you about X# :)
> Hi Again... :)
>
> What am I missing? This code
>
> //Job Number Search
> ELSEIF Len(AllTrim(self:oDCSingleLineEdit1:CurrentText)) > 0
> nOption := 5
> oServer := DETAILS{}
> oWin := JobNoRep{}
>
> oWin:GoTop()
>
> oWin:server:SetOrder("JobNumber", "DETAILS")
> oWin:Seek(self:oDCSingleLineEdit1:CurrentText)
> oWin := JobNoRep{,, (oWin:server), oWin:JOBNUMBER}
> cName := oWin:FIELDGET(#CLNAME)
> cTempServer := CLIENT{}
> cCode := oWin:FIELDGET(#CLCODE)
> cTempServer:Seek(cCode)
> cName := cTempServer:FIELDGET(#CLNAME)
> cCaption := AllTrim(cCode) + " - " + AllTrim(cName)
> cTempServer:Close()
> oWin:ClientName := cCaption
> self:Owner:Owner:Owner:EndWindow()
> oWin:Show(SHOWCENTERED)
>
> self:EndDialog()
>
>
> Produces a value of NIL00012 where "00012" could be any 5 digit Job number found in the database.
>
> When I put a ?? uExtra to see that the variable is being passed correctly in the postinit of the JobNoRep form, it returns the NIL before the Job Number, and after several hours and attemots, I cannot for the life of me work out why. Any ideas please?
>
> Thanks very much
>
> Jeff
>
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <nospam@example.com> |
|---|---|
| Date | 2019-04-08 11:23 -0400 |
| Message-ID | <q8fp13$313$1@gioia.aioe.org> |
| In reply to | #12367 |
Simple advice! Use the VO debugger, place a break point and step through
code and watch the variables, etc.
Jamal
"Jeff Rollo" wrote in message
news:9fe69513-5e9b-4d87-8f17-ab1329f5fbdc@googlegroups.com...
Hi Again... :)
What am I missing? This code
//Job Number Search
ELSEIF Len(AllTrim(self:oDCSingleLineEdit1:CurrentText)) > 0
nOption := 5
oServer := DETAILS{}
oWin := JobNoRep{}
oWin:GoTop()
oWin:server:SetOrder("JobNumber", "DETAILS")
oWin:Seek(self:oDCSingleLineEdit1:CurrentText)
oWin := JobNoRep{,, (oWin:server), oWin:JOBNUMBER}
cName := oWin:FIELDGET(#CLNAME)
cTempServer := CLIENT{}
cCode := oWin:FIELDGET(#CLCODE)
cTempServer:Seek(cCode)
cName := cTempServer:FIELDGET(#CLNAME)
cCaption := AllTrim(cCode) + " - " + AllTrim(cName)
cTempServer:Close()
oWin:ClientName := cCaption
self:Owner:Owner:Owner:EndWindow()
oWin:Show(SHOWCENTERED)
self:EndDialog()
Produces a value of NIL00012 where "00012" could be any 5 digit Job number
found in the database.
When I put a ?? uExtra to see that the variable is being passed correctly in
the postinit of the JobNoRep form, it returns the NIL before the Job Number,
and after several hours and attemots, I cannot for the life of me work out
why. Any ideas please?
Thanks very much
Jeff
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web