Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you derive visual class from prg based class?
Message
 
 
To
10/01/2006 12:55:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01085259
Message ID:
01085288
Views:
12
Ok, nothing works so far.

Here is again my class hierarchy.

custom - acustom (defined in Common_Utility.prg, which is shared by two projects) - BusinessProcess class (which I put in a separate BusinessClass.prg) - AssignQueues class (which I put in a separate AssignQueuesClass.prg).

Here is my program, which I hoped would work, but it didn't:
*  Function....: Assign_Queues
*)  Description: This function is used to assign queues to employees from the "holding tank"
*)               Each user is supposed to get queues according to his/her profile (Employee_Queue_Profiles)
*)
*   Scope:      Public
*   Parameters: tcQueue_Name_From, tcQueue_Name_To, tcDepartment_Code, tcUserID, tnNumberOfDays
*$  Usage: MESSAGEBOX(assign_queues("UNASSIGNED","DAILY","O","NNOSO001",2))
*$
*   Returns: Error if occurred
*--------------------- Maintenance Section ----------------------
*   Change Log:
*       CREATED 	02/18/2005 - NN
*		MODIFIED    01/10/2006 - NN
*----------------------------------------------------------------
function Assign_Queues
lparameters tcQueue_Name_From, tcQueue_Name_To, ;
	tcDepartment_Code, tcUserID, tnNumberOfDays

local loProcess, lcError, llReleaseProcedure, lcPath
llReleaseProcedure = .f.
lcPath = addbs(justpath(sys(16,1)))
if lower(right(m.lcPath,7)) <> "\progs\"
	lcPath = m.lcPath + "Progs\"
endif
 
if not "businessprocessclass" $ lower(set('procedure'))
	set procedure to (m.lcPath + "BusinessProcessClass.prg") additive
	llReleaseProcedure = .t.
endif

loProcess = newobject('AssignQueues', m.lcPath + 'AssignQueuesClass.prg')
m.loProcess.RunProcess(m.tcQueue_Name_From, m.tcQueue_Name_To, ;
	m.tcDepartment_Code, m.tcUserID, m.tnNumberOfDays) && "UNASSIGNED","DAILY","O","NNOSO001",14)
lcError =  m.loProcess.cError

if m.llReleaseProcedure
	release procedure BusinessProcessClass
endif

return m.lcError
The problem we're getting is that it's trying to search for BusinessProcessClass.fxp in the root directory.

So, the idea we have is to put BusinessProcessClass inside the Common_Utility program as well rather than in a separate program (this class has less likehood to change than AssignQueues class). Since common_utility is a part of the project, hopefully it would work.

===================
Now, for my own convenience I prefer to work with vcx based classes rather than with prg based. So, I would work with vcx based version locally, once I satisfied, I would create it as prg from Class Browser and release it. A little bit on inconvenience, but alah, it's life...
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform