Jill,
My pleasure, glad to help.
Re: the examples, they are treasure chests . . . Note there are two sets:
There is the PB set of them
Pb6\Examples\
. . . and . . .
There is the PFC set of them
Pb6\adk\pfc\
...includes...
Pb6\adk\pfc\examples - example of every service, well almost <g>
Pb6\adk\pfc\qckstart - 'Quick Start' -
excellent way to jumpstart new apps, or
to test something simple
Pb6\adk\pfc\demoapp - 'PEAT' demo app
Pb6\adk\pfc\tutorial - solutions to Sybase PFC tutorial
In addition to learning easily from them... Consider this - All PFCers
share these examples - This makes it easy to share info with others when
say trying to show how to reproduce some behavior. You can simply send a
little extra PBL to someone, or you can reference where to look or tweak.
Have fun,
~Sharon
--
Sharon Weinstrom Buntz | mailto:[EMAIL PROTECTED]
Cheat Sheet for PFC/PB Help | http://www.pfccheatsheet.com/
"Jill M. Claus" wrote:
>
> Thank you so much Sharon! I'm so new to Powerbuilder that I didn't realize that
>some was PFC and some wasn't... so when things weren't working I was even more
>confused! I mistakenly assumed that any sample provided with the system would use
>PFC.... silly me :-) I really appreciate your step by step that you sent me - it
>sure makes this easier!
>
> Jill Claus (842-4369)
> Financial Information Management
>
> >>> Sharon Buntz <[EMAIL PROTECTED]> 09/30/99 11:32AM >>>
> aHa, Jill
>
> Yes, indeedy. It's all starting to make sense now :-)
>
> 1) You have been mixing PLAIN PB stuff with PFC stuff <bg>... Well, I
> wish there were a _PFC_ Example of the QueryMode service like the PB one,
> but I couldn't find one. Flipside, it is a relatively easy service.
> Here's how...
>
> 2) Turn on the service in the DW's constructor, by calling
> of_SetQuerymode(TRUE)
>
> 3) Call of_SetColumnNameSource()/of_SetQueryCols() if desired
>
> 4) Do not code any dw_1.Object.datawindow.QueryMode= 'yes/no' - Nor any
> other such things, such as QueryClear, etc. Instead, you will use the PFC
> QueryMode Service function, of_SetEnabled(), which does that and more for
> you. Feel free to go look at the code in
> pfcdwsrv(pfc_n_cst_dwsrv_querymode) and pfcmain(pfc_u_dw)
>
> a) For the Query button, if not of_GetEnabled(), then of_SetEnabled(TRUE)
>
> b) For the Retrieve button, if of_GetEnabled(), then
> of_SetEnabled(FALSE). Then, either call of_SetRetrieveOnDisabled(FALSE)
> and do your own retrieve, or go with the default and let it auto-retrieve
> when QueryMode is disabled.
>
> c) For the Save/Load buttons, all that is needed is the of_Save/Load()'s
>
> 5) You may also want to enable/disable the Save button appropriately
> (since you cannot save a query unless the user is in QueryMode and has
> entered something to save).
>
> 6) Once the user retrieves and then reenters into QueryMode, yes, the
> normal behavoir is that the previous query info is "lost" (if not saved and
> then reloaded). I suppose that if you and your users really wanted to, you
> could try to code in that functionality. But, hm, I personally would see
> if it was worth it. Maybe y'all could compromise and do that only if they
> previously did a save or something.
>
> 7) That's it! You're QueryModing PFC style now <s>
>
> Have fun,
> ~Sharon
> --
> Sharon Weinstrom Buntz | mailto:[EMAIL PROTECTED]
> Cheat Sheet for PFC/PB Help | http://www.pfccheatsheet.com/
>
> "Jill M. Claus" wrote:
> >
> > Sharon,
> >
> > I agree, things definitely weren't adding up - that's why I was so confused!
> >
> > There is only one datawindow on the window. I had copied the window from the
>PowerBuilder examples and just looked again at the two functions that were already in
>there. (wf_query_mode and wf_retrieve_mode) The following line is in each
>respectively dw_1.Object.datawindow.querymode= 'yes' and
>dw_1.Object.datawindow.querymode= 'no' ... I tried switching the code so that it does
>a SetQueryMode on open and then SetEnabled as needed, but then when you switch back
>and forth between query / retrieve modes, you loose the criteria you just typed in.
>I think that may have been what was causing me all the problems! It's all starting
>to make sense now :-)
> >
> > Jill
> >
> > Jill Claus (842-4369)
> > Financial Information Management
> >
> > >>> Sharon Buntz <[EMAIL PROTECTED]> 09/30/99 01:42AM >>>
> > yo, Jill
> >
> > So glad you got it working... But, wait, something does NOT add up!
> >
> > If THAT were the problem (if you had not yet called of_SetQuerymode(TRUE)),
> > then your dw_1.inv_querymode.of_Load() would have gotten a null object
> > reference. Jill, you only have to call of_SetQuerymode(TRUE) ONCE - to
> > instantiate the service - usually in the DW's constructor. But now it
> > sounds like you have it THREE times in your 'window':
> > 1) Wherever your window had it to make QueryMode work in the first place,
> > 2) Wherever you added it to make your save work, and now
> > 3) Wherever you just added it to make your load work.
> >
> > And there IS only ONE DW doing the QueryMode hop in your 'window', correct?
> >
> > And there is NOT any place doing a of_SetQuerymode(FALSE), correct? (The
> > code to turn off the service is in pfc_u_dw's destructor event.)
> >
> > When I first read your note, I thought, well maybe she means
> > of_SetEnabled(). But, no, that would not make sense either!
> >
> > Whaddup, girl?!
> >
> > ~Sharon
> > --
> > Sharon Weinstrom Buntz | mailto:[EMAIL PROTECTED]
> > Cheat Sheet for PFC/PB Help | http://www.pfccheatsheet.com/
> >
> > "Jill M. Claus" wrote:
> > >
> > > Duncan & Sharon,
> > >
> > > I got it working! :-)
> > >
> > > As it turns out, I did have to explicitly say of_SetQuerymode(TRUE) before the
>load. (not only just for the save)
> > >
> > > Thank you so much for your help!
> > >
> > > Jill
> > >
> > > Jill Claus (842-4369)
> > > Financial Information Management
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]