Página 1 de 1

TRecentListMenu in a TPopupMenu

Publicado: Vie May 21, 2010 7:36 pm
por Guest
Hi!
I would like to fill a TPopupMenu with items from a TRecentlist:
METHOD FormInitialize( oSender ) CLASS TForm1
WITH OBJECT ::oMenuMru := TRecentListMenu():New()
:cIniFile := AppData:cInilocalFile
:Read()
:Create( ::oPopupMenuMRU )
:OnClick := { | oSender, cFile | MsgInfo( cFile ) }
END WITH
RETURN Nil
I get this error:
Untersystemaufruf: BASE
Systemcode: 1132
Default-Status: .F.
Beschreibung: Bound error
Operation: array access
Argumente: [ 1] = Typ: A Wert: [ 2] = Typ: N Wert: 1
Involvierte Dateien:
DOS-Fehlercode: 0
Aufgerufene Programmteile:
TRECENTLISTMENU:BUILDMENU (89)
TRECENTLISTMENU:CREATE (60)
TFORM1:FORMINITIALIZE (165)
Is it only possible to add a TRecentList to a TMenu?
Best regards, Timm.

TRecentListMenu in a TPopupMenu

Publicado: Mar May 25, 2010 12:08 pm
por ignacio
Timm,
Sample from our xaDbu:
WITH OBJECT ::oDirsMru := TRecentListMenu():New()
:cIniFile := ::cIniFile
:cIniSection := "xaDbu DirsMru"
:lFullPath := .T.
:nMenu := 0
:nMenuPos := 0
:nMaxItems := 10
:lSubMenu := .F.
:lSeparator := .F.
:Read()
:Create( ::oMnuDir )
:OnClick := { |o, cPath |::LoadFiles( cPath ) }
END
Regards,
--
Ignacio Ortiz de Zúñiga
[Equipo de Xailer/Xailer team]
http://www.xailer.com
http://www.xailer.info
"Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje de
noticias:4bf6c48b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hi!
>
> I would like to fill a TPopupMenu with items from a TRecentlist:
>
> METHOD FormInitialize( oSender ) CLASS TForm1
>
> WITH OBJECT ::oMenuMru := TRecentListMenu():New()
> :cIniFile := AppData:cInilocalFile
> :Read()
> :Create( ::oPopupMenuMRU )
> :OnClick := { | oSender, cFile | MsgInfo( cFile ) }
> END WITH
>
> RETURN Nil
>
> I get this error:
> Untersystemaufruf: BASE
> Systemcode: 1132
> Default-Status: .F.
> Beschreibung: Bound error
> Operation: array access
> Argumente: [ 1] = Typ: A Wert: [ 2] = Typ: N Wert: 1
> Involvierte Dateien: DOS-Fehlercode: 0
> Aufgerufene Programmteile:
> TRECENTLISTMENU:BUILDMENU (89)
> TRECENTLISTMENU:CREATE (60)
> TFORM1:FORMINITIALIZE (165)
>
> Is it only possible to add a TRecentList to a TMenu?
>
> Best regards, Timm.
>

TRecentListMenu in a TPopupMenu

Publicado: Mar May 25, 2010 12:08 pm
por ignacio
Timm,
Sample from our xaDbu:
WITH OBJECT ::oDirsMru := TRecentListMenu():New()
:cIniFile := ::cIniFile
:cIniSection := "xaDbu DirsMru"
:lFullPath := .T.
:nMenu := 0
:nMenuPos := 0
:nMaxItems := 10
:lSubMenu := .F.
:lSeparator := .F.
:Read()
:Create( ::oMnuDir )
:OnClick := { |o, cPath |::LoadFiles( cPath ) }
END
Regards,
--
Ignacio Ortiz de Zúñiga
[Equipo de Xailer/Xailer team]
http://www.xailer.com
http://www.xailer.info
"Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje de
noticias:4bf6c48b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hi!
>
> I would like to fill a TPopupMenu with items from a TRecentlist:
>
> METHOD FormInitialize( oSender ) CLASS TForm1
>
> WITH OBJECT ::oMenuMru := TRecentListMenu():New()
> :cIniFile := AppData:cInilocalFile
> :Read()
> :Create( ::oPopupMenuMRU )
> :OnClick := { | oSender, cFile | MsgInfo( cFile ) }
> END WITH
>
> RETURN Nil
>
> I get this error:
> Untersystemaufruf: BASE
> Systemcode: 1132
> Default-Status: .F.
> Beschreibung: Bound error
> Operation: array access
> Argumente: [ 1] = Typ: A Wert: [ 2] = Typ: N Wert: 1
> Involvierte Dateien: DOS-Fehlercode: 0
> Aufgerufene Programmteile:
> TRECENTLISTMENU:BUILDMENU (89)
> TRECENTLISTMENU:CREATE (60)
> TFORM1:FORMINITIALIZE (165)
>
> Is it only possible to add a TRecentList to a TMenu?
>
> Best regards, Timm.
>

TRecentListMenu in a TPopupMenu

Publicado: Mar May 25, 2010 3:11 pm
por Guest
Ignacio,
works great, many thanks!
:nMenu := 0 was missing in my code.
Best regards, Timm.
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> schrieb im
Newsbeitrag news:[email=4bfba1ae@svctag-j7w3v3j....]4bfba1ae@svctag-j7w3v3j....[/email]
> Timm,
>
> Sample from our xaDbu:
>
> WITH OBJECT ::oDirsMru := TRecentListMenu():New()
> :cIniFile := ::cIniFile
> :cIniSection := "xaDbu DirsMru"
> :lFullPath := .T.
> :nMenu := 0
> :nMenuPos := 0
> :nMaxItems := 10
> :lSubMenu := .F.
> :lSeparator := .F.
> :Read()
> :Create( ::oMnuDir )
> :OnClick := { |o, cPath |::LoadFiles( cPath ) }
> END
>
> Regards,
> --
> Ignacio Ortiz de Zúñiga
> [Equipo de Xailer/Xailer team]
> http://www.xailer.com
> http://www.xailer.info
>
> "Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje de
> noticias:4bf6c48b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Hi!
>>
>> I would like to fill a TPopupMenu with items from a TRecentlist:
>>
>> METHOD FormInitialize( oSender ) CLASS TForm1
>>
>> WITH OBJECT ::oMenuMru := TRecentListMenu():New()
>> :cIniFile := AppData:cInilocalFile
>> :Read()
>> :Create( ::oPopupMenuMRU )
>> :OnClick := { | oSender, cFile | MsgInfo( cFile ) }
>> END WITH
>>
>> RETURN Nil
>>
>> I get this error:
>> Untersystemaufruf: BASE
>> Systemcode: 1132
>> Default-Status: .F.
>> Beschreibung: Bound error
>> Operation: array access
>> Argumente: [ 1] = Typ: A Wert: [ 2] = Typ: N Wert: 1
>> Involvierte Dateien: DOS-Fehlercode: 0
>> Aufgerufene Programmteile:
>> TRECENTLISTMENU:BUILDMENU (89)
>> TRECENTLISTMENU:CREATE (60)
>> TFORM1:FORMINITIALIZE (165)
>>
>> Is it only possible to add a TRecentList to a TMenu?
>>
>> Best regards, Timm.
>>

TRecentListMenu in a TPopupMenu

Publicado: Mar May 25, 2010 3:11 pm
por Guest
Ignacio,
works great, many thanks!
:nMenu := 0 was missing in my code.
Best regards, Timm.
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> schrieb im
Newsbeitrag news:[email=4bfba1ae@svctag-j7w3v3j....]4bfba1ae@svctag-j7w3v3j....[/email]
> Timm,
>
> Sample from our xaDbu:
>
> WITH OBJECT ::oDirsMru := TRecentListMenu():New()
> :cIniFile := ::cIniFile
> :cIniSection := "xaDbu DirsMru"
> :lFullPath := .T.
> :nMenu := 0
> :nMenuPos := 0
> :nMaxItems := 10
> :lSubMenu := .F.
> :lSeparator := .F.
> :Read()
> :Create( ::oMnuDir )
> :OnClick := { |o, cPath |::LoadFiles( cPath ) }
> END
>
> Regards,
> --
> Ignacio Ortiz de Zúñiga
> [Equipo de Xailer/Xailer team]
> http://www.xailer.com
> http://www.xailer.info
>
> "Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje de
> noticias:4bf6c48b$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
>> Hi!
>>
>> I would like to fill a TPopupMenu with items from a TRecentlist:
>>
>> METHOD FormInitialize( oSender ) CLASS TForm1
>>
>> WITH OBJECT ::oMenuMru := TRecentListMenu():New()
>> :cIniFile := AppData:cInilocalFile
>> :Read()
>> :Create( ::oPopupMenuMRU )
>> :OnClick := { | oSender, cFile | MsgInfo( cFile ) }
>> END WITH
>>
>> RETURN Nil
>>
>> I get this error:
>> Untersystemaufruf: BASE
>> Systemcode: 1132
>> Default-Status: .F.
>> Beschreibung: Bound error
>> Operation: array access
>> Argumente: [ 1] = Typ: A Wert: [ 2] = Typ: N Wert: 1
>> Involvierte Dateien: DOS-Fehlercode: 0
>> Aufgerufene Programmteile:
>> TRECENTLISTMENU:BUILDMENU (89)
>> TRECENTLISTMENU:CREATE (60)
>> TFORM1:FORMINITIALIZE (165)
>>
>> Is it only possible to add a TRecentList to a TMenu?
>>
>> Best regards, Timm.
>>