Mirage Engine
element editor - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: element editor (/showthread.php?tid=1020)



element editor - genusis - 15-06-2007

Here's one for ya dave.

well runtime error 380
invalid property value
Code:
Public Sub ElementEditorInit()
    frmElementEditor.txtName.Text = Trim(Element(EditorIndex).Name)
    frmElementEditor.scrlStrong.Value = Element(EditorIndex - 1).Strong
    frmElementEditor.scrlWeak.Value = Element(EditorIndex - 1).Weak
    frmElementEditor.Show vbModal
End Sub

H8ighlights this.
frmElementEditor.txtName.Text = Trim(Element(EditorIndex).Name)


____________________________________________________________
The rest of the code for that part.

Code:
Private Sub scrlStrong_Change()
    lblStrong.Caption = Element(scrlStrong.Value).Name
End Sub

Code:
Public Sub ElementEditorOk()
    Element(EditorIndex - 1).Name = frmElementEditor.txtName.Text
    Element(EditorIndex - 1).Strong = frmElementEditor.scrlStrong.Value
    Element(EditorIndex - 1).Weak = frmElementEditor.scrlWeak.Value
    Call SendSaveElement(EditorIndex - 1)
    Call ElementEditorCancel
End Sub
Code:
Public Sub ElementEditorCancel()
    InElementEditor = False
    Unload frmElementEditor
End Sub

Someone please help me.


Re: element editor - Ramsey - 16-06-2007

Can you post the Rec?


Re: element editor - genusis - 16-06-2007

well da undead fixed it for me. he didnt need to use the rec. but the fix was:

Code:
Public Sub ElementEditorInit()
    Element(EditorIndex).Name = frmElementEditor.txtName.Text
    Element(EditorIndex).Strong = frmElementEditor.scrlStrong.Value
    Element(EditorIndex).Weak = frmElementEditor.scrlWeak.Value
    frmElementEditor.Show vbModal
End Sub
Code:
Public Sub ElementEditorOk()
    Element(EditorIndex).Name = frmElementEditor.txtName.Text
    Element(EditorIndex).Strong = frmElementEditor.scrlStrong.Value
    Element(EditorIndex).Weak = frmElementEditor.scrlWeak.Value
    Call SendSaveElement(EditorIndex)
    Call ElementEditorCancel
End Sub

I would have never guessed that. But thanks for offering your help Xero, and Dave.