View Full Version : Change ImageGallery from SRC to View
Jim Albright
6-Jul-2009, 04:54 PM
I would like to change the ImageGallery from a .src to a .vw and include it in another application.
However, I am getting errors as follows when compiling (abbreviated messages for clarity):
error 4345: Type check error "too many arguments" in FileDateTime.pkg line 185
error 4345: Type check error "too many arguments" in FileDateTime.pkg line 186
error 52: Bad format in expression (opeator) 2 in FileDateTime.pkg line 212
error 4345: Type check error "invalid literal" in FileDateTime.pkg line 213
The ImageGallery.src compiles and runs fine, so there may be something I am missing when converting the .src to a .vw.
Vincent Oorsprong
6-Jul-2009, 11:04 PM
Jim,
I think the problem is not the conversion from src to vw but a conflict between the supplied FileDateTime.pkg and some package in your system, probably with something from vdf guidance or so. I don't have the problem here and thus it is pretty difficult to reproduce and help you with a direct hit.
Jim Albright
8-Jul-2009, 11:58 AM
Well, again, you are correct.
In FileDateTime.pkg there is a structure definition using tFileTime FileTime (last line below):
Function ConvertDateTimeToSystemDateTime Global DWord dwLowDateTime DWord dwHighDateTime Returns DateTime
String sFormattedTime sFormattedDate
Integer iSuccess iDataLength
tSystemTime SystemTime
tFileTime FileTime
and
Function FileDateTime Global String sFilePath Returns tFileDateTime[]
Handle hFindFile
Integer iVoid iRetval iFile
DateTime dtFileTime
tWin32_Find_Data Win32_Find_Data
tFileDateTime[] FileDateTime
So, I added a "G" to the end of the varible declarations so that it looks like this
Function FileDateTime Global String sFilePath Returns tFileDateTime[]
Handle hFindFile
Integer iVoid iRetval iFile
DateTime dtFileTime
tWin32_Find_Data Win32_Find_DataG
tFileDateTime[] FileDateTimeG
and
Function ConvertDateTimeToSystemDateTime Global DWord dwLowDateTime DWord dwHighDateTime Returns DateTime
String sFormattedTime sFormattedDate
Integer iSuccess iDataLength
tSystemTime SystemTime
tFileTime FileTimeG
And changed all the varible references in the funcitons to include the "G". Now it compiles and works.
Another Question: what should I use as the container for the image gallery. I currently am using ModalPanel. What do you suggest?
Thanks,
Jim Albright
23-Jul-2009, 02:51 PM
Vincent,
Another Question: what should I use as the container for the image gallery. I currently am using ModalPanel. What do you suggest?
Jim
Vincent Oorsprong
24-Jul-2009, 02:46 AM
Jim,
Maybe I do not understand your question.
You can use (basic)panel, modalpanel, toolpanel. Do not think it is limited to a certain Visual DataFlex container.
Jim Albright
24-Jul-2009, 09:50 AM
I tried toolpanel and that did not work. I am using ModalPanel and while that works to some extent, the status bar does not work. Shows nothing.
Vincent Oorsprong
24-Jul-2009, 10:46 AM
Jim,
But Statusbar is not part of the cImageContainer and instead part of the CodeJock stuff. So what does fail on a ToolPanel? The image part or CodeJock?
Jim Albright
24-Jul-2009, 11:34 AM
Object oStatusBar is a cCJStatusBar
Object oStatusBar is a cCJStatusBar
Object oStatusPane1 is a cCJStatusBarPane
Set piID to sbpIDIdlePane
Set pbStyleStretch to True
End_Object
Object oCurrentPaneStatusBarPane is a cCJStatusBarPane
Set psText to "Current Folder:"
Set pbStyleNoBorders to True
End_Object
Object oCurrentFolderNameStatusPane is a cCJStatusBarPane
Set pbStyleStretch to True
End_Object
Procedure DisplayFileName String sFileName
Set psText of oStatusPane1 to sFileName
End_Procedure
Procedure DisplayCurrentFolder String sFolder
Set psText of oCurrentFolderNameStatusPane to sFolder
End_Procedure
Procedure activating
Set StatusBar_Id to Self
End_Procedure
End_Object
The child objects in the above display blanks.
Jim Albright
24-Jul-2009, 01:10 PM
I have narrowed it down to the procedure OnItemChanged in the treeview.
Procedure OnItemChanged Handle hItem Handle hItemOld
Integer iItemData
String sFolderPath
Handle hoStatusBar
Get ItemData hItem to iItemData
If (iItemData = C_FOLDERITEM) Begin
Set pbEnabled of oFilesIdleManager to True
End
Get StatusBar_Id of oMyImageView to hoStatusBar //<< this is my problem!
If (hoStatusBar > 0) Begin
Get ItemFullPath hItem to sFolderPath
Send DisplayCurrentFolder of hoStatusBar sFolderPath
End
End_Procedure
The command Get StatusBar_ID of oMyImageView to hoStatusBar returns 0 everytime. So, the lines to set the statusbar data never gets executed.
Vincent Oorsprong
24-Jul-2009, 01:19 PM
Jim.
Try:
Get phoStatusBar of <Name of your CommandBars object> to hoStatusBar
Jim Albright
24-Jul-2009, 01:49 PM
Vincent,
Thanks. That worked.:)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.