In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

TRecentListMenu in a TPopupMenu

Xailer professional forum in English
Responder
Guest

TRecentListMenu in a TPopupMenu

Mensaje 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.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9469
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

TRecentListMenu in a TPopupMenu

Mensaje 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.
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9469
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

TRecentListMenu in a TPopupMenu

Mensaje 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.
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Guest

TRecentListMenu in a TPopupMenu

Mensaje 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.
>>
Guest

TRecentListMenu in a TPopupMenu

Mensaje 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.
>>
Responder