Jump to content

Farshad Mohajeri

Administrators
  • Posts

    12099
  • Joined

  • Last visited

  • Days Won

    801

Everything posted by Farshad Mohajeri

  1. This project was originally developed in early 90s for a course homework. It was developed in Turbo Pascal 4.0. I ported it to Delphi a few years ago and recently ported again to uniGUI. I haven't touched the original code much. There was no Internet at that time and no online access to code samples or algorithms for computer graphics. All algorithms including shading and rendering algorithm are purely my own work. Warning! Spaghetti code ahead!!! Online demo is here: http://prime.fmsoft....emo/curve3d.dll Curve3D.rar
  2. So deployment must be identical to VPS deployment.
  3. I looked at Azure plans but couldn't see how they actually work. Do they offer dedicated virtual machine plans?
  4. Ext JS Grid doesn't natively support this feature.
  5. There is no default DOC when you call an ISAPI dll. http://prime.fmsoft.net/demo/ucdemo.dll What is the URL you use to start your web site?
  6. Hello, I can't say the exact time for a non-beta release because it is very hard to predict. Current version is 0.89.0 and starting from version 0.90.0 to 1.0.0 product will take its final shape. This will include licensing details, price, documentation and source distribution policy. I know that it is difficult to create new component without docs and looking at source, but before we release those details we must make sure that internal architecture will not change anymore. My goal is to make all necessary changes wherever needed and finalize the internal architecture of the product in version 0.90.0.
  7. http://forums.unigui.com/index.php?/topic/1894-version-0890/page__view__findpost__p__8251
  8. Another thing: In web mode DoOnEnter and DoOnExit aren't called unless user event handlers are assigned. Solution: constructor TUniEditText.Create(AOwner: TComponent); begin inherited Create(AOwner); PersistentEvents := PersistentEvents + [evEnter, evExit]; end;
  9. In uniGUI method names are: procedure DoOnEnter; virtual; procedure DoOnExit; virtual;
  10. You already answered your question.
  11. CaretPos will not be available on server side. We can't update a server side coordinate each time user types a key. It will create lots of unwanted ajax traffic. It has meaning only on client side. For a possible client side solution refer to Ext JS documentation.
  12. Here is your component adopted to TUniCustomComboBox by making few changes to your original code. I didn't test its functionality as I didn't know how to. It compiles, installs and appear in both web and vcl mode. unit ComboboxYeni; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, uniComboBox; type TComboBoxYeni = class(TUniCustomComboBox) private FValue : String; FList : TStrings; SonTus : Word; FAllValueList : TStrings; FParentValue: String; FAllItemList: TStrings; FParentValueList: TStrings; FTag: Longint; procedure SetValueControl(const Value: String); procedure SetValueList(const Value: TStrings); Function GetValueControl : String; procedure SetAllValueList(const Value: TStrings); procedure SetParentValue(const Value: String); procedure SetAllItemList(const Value: TStrings); procedure SetParentValueList(const Value: TStrings); procedure SetTag(const Value: Longint); { Private declarations } protected procedure KeyDown(var Key: Word; Shift: TShiftState); override; procedure DoExit;override; { Protected declarations } public LastKey : Word; constructor Create(AOwner: TComponent); override; destructor Destroy; override; Procedure ItemSil(Const PValue : String); Procedure ItemEkle(Const PItem,PValue ,PParentValue: String); Procedure ParentValueSil(Const PValue : String); Procedure ClearAll; function TirnakliText : String; Property AllValueList : TStrings Read FAllValueList Write SetAllValueList; Property AllItemList : TStrings Read FAllItemList Write SetAllItemList; Property ParentValueList : TStrings Read FParentValueList Write SetParentValueList; { Public declarations } published property Value : String read GetValueControl write SetValueControl; property ValueList : TStrings read FList write SetValueList; property ParentValue : String read FParentValue write SetParentValue; property Tag: Longint read FTag write SetTag; property Style; {Must be published before Items} property Anchors; property Color; property Constraints; property Enabled; property Font; property MaxLength; property ParentBiDiMode; property ParentColor; property ParentFont; property ParentShowHint; property ShowHint; property Sorted; property TabOrder; property TabStop; property Visible; property OnClick; property OnDblClick; property OnEnter; property OnExit; property OnKeyDown; property OnKeyPress; property OnKeyUp; property Items; { Must be published after OnMeasureItem } { Published declarations } end; procedure Register; implementation procedure Register; begin RegisterComponents('Standard', [TComboBoxYeni]); end; { TComboBoxYeni } constructor TComboBoxYeni.Create(AOwner: TComponent); begin inherited Create(AOwner); FList := TStringList.Create; FAllValueList := TStringList.Create; FAllItemList := TStringList.Create; FParentValueList:= TStringList.Create; FValue := ''; Try ItemIndex := Tag; Except End; end; destructor TComboBoxYeni.Destroy; begin FList.Free; FAllValueList.Free; FAllItemList.Free; FParentValueList.Free; inherited Destroy; end; procedure TComboBoxYeni.SetValueControl(const Value: String); begin FValue := Value; Try ItemIndex := ValueList.IndexOf(Value); Except ItemIndex := -1; End; end; Function TComboBoxYeni.GetValueControl : String; begin Try Result := ValueList.Strings[itemIndex] Except Result := ''; End; end; procedure TComboBoxYeni.KeyDown(var Key: Word; Shift: TShiftState); begin SonTus := Key; if ((SonTus = 8) or (SonTus = VK_DELETE)) then begin SonTus := 0; ItemIndex := -1; end; inherited KeyDown(Key,Shift); // If (Style = csDropDownList) And (Key = VK_DELETE) Then // ItemIndex := -1; end; function TComboBoxYeni.TirnakliText: String; begin Result := #39 + Trim(Value) + #39; end; procedure TComboBoxYeni.DoExit; begin If Text = '' Then Begin ItemIndex := -1; Value := ''; Hint := Value; End; //Else ItemIndex := ValueIndex; Inherited ; end; procedure TComboBoxYeni.SetValueList(const Value: TStrings); begin FList.Assign(Value); end; procedure TComboBoxYeni.SetAllValueList(const Value: TStrings); begin FAllValueList.Assign(Value); end; procedure TComboBoxYeni.SetAllItemList(const Value: TStrings); begin FAllItemList.Assign(Value); end; procedure TComboBoxYeni.SetParentValueList(const Value: TStrings); begin FParentValueList.Assign(Value); end; procedure TComboBoxYeni.SetParentValue(const Value: String); Var I : Integer; begin FParentValue := Value; If (AllValueList.Count > 0) Then Begin Items.Clear; // Listedekileri siler. ValueList.Clear; // Değer listesini siler... If ParentValueList.Count > 0 Then Begin For I := 0 To AllValueList.Count - 1 Do Begin If (ParentValueList.Strings[i] = FParentValue) or (FParentValue = '') Then Begin ValueList.Add(AllValueList.Strings[i]); Items.Add(AllItemList.Strings[i]); End; End; End Else Begin For I := 0 To AllValueList.Count - 1 Do Begin ValueList.Add(AllValueList.Strings[i]); Items.Add(AllItemList.Strings[i]); End; End; End; end; procedure TComboBoxYeni.SetTag(const Value: Longint); begin FTag := Value; Try ItemIndex := Value; Except ItemIndex := -1; End; end; procedure TComboBoxYeni.ItemSil(const PValue: String); Var I : Integer; begin // Tüm listeden siler I := AllValueList.IndexOf(PValue); If I > -1 Then Begin AllItemList.Delete(I); AllValueList.Delete(I); End; // Geçerli olan listeden siler... I := ValueList.IndexOf(PValue); If I > -1 Then Begin ValueList.Delete(I); Items.Delete(I); End; end; procedure TComboBoxYeni.ItemEkle(const PItem, PValue, PParentValue: String); begin If (PItem <> '') And (PValue <> '') And (PParentValue <> '') Then Begin AllValueList.Add(PValue); AllItemList.Add(PItem); ParentValueList.Add(PParentValue); Items.Add(PItem); End; end; procedure TComboBoxYeni.ParentValueSil(const PValue: String); Var I : Integer; begin For I := 0 To ParentValueList.Count - 1 Do Begin If ParentValueList.Strings[i] = PValue Then Begin ParentValueList.Delete(I); AllValueList.Delete(I); AllItemList.Delete(I); End; End; SetParentValue(ParentValue); end; procedure TComboBoxYeni.ClearAll; begin Items.Clear; ValueList.Clear; ParentValueList.Clear; AllValueList.Clear; AllItemList.Clear; end; end.
  13. Sorry I didn't understand your question.
  14. There is no explicit limit to parameter size. However, parameters are URIencoded before sending to the server and it adds lots of overhead to the binary stream.It may increase size of binary stream to 2 or 3 times.
  15. I'm not aware of such technology, which allows sending files without displaying a dialog screen first. Can you point us to a page that implements this feature?
  16. For obvious reasons file upload dialog can not be omitted. File upload is a native browser functionality. For security reasons a web site can not upload a file from users' disk without asking them first. Otherwise everyone could grab files with sensitive information.
  17. You maybe able to create a new component with same functionality based on TUniCustomComboBox.
  18. What is your purpose for doing this? Why users simply don't type into those fields?
  19. Server side: uses ...uniGUIAplication, procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS(' your JS code'); end; Client side: function OnClick(sender, e) { your code here } See our demos for client side scripting.
  20. document.getElementById('UrlFrame_id').contentWindow.document.getElementById('input_id').value="test text"; You must replace UrlFrame_id and input_id with proper real ids.
×
×
  • Create New...