diff --git a/uppsrc/Core/Value.cpp b/uppsrc/Core/Value.cpp index 8afbf6868..608f540c6 100644 --- a/uppsrc/Core/Value.cpp +++ b/uppsrc/Core/Value.cpp @@ -33,8 +33,9 @@ void Value::RefRetain() Value& Value::operator=(const Value& v) { if(this == &v) return *this; - FreeRef(); - data = v.data; + Value h = v; // Make copy a 'v' can be reference to ValueMap/Array contained element + FreeRef(); // e.g. json = json["foo"] + data = h.data; if(IsRef()) ptr()->Retain(); return *this; diff --git a/uppsrc/CtrlLib/src.tpp/DocEdit$en-us.tpp b/uppsrc/CtrlLib/src.tpp/DocEdit$en-us.tpp index 4de066411..9e63a2da4 100644 --- a/uppsrc/CtrlLib/src.tpp/DocEdit$en-us.tpp +++ b/uppsrc/CtrlLib/src.tpp/DocEdit$en-us.tpp @@ -19,21 +19,7 @@ paragraphs (wraps them).&] [s0; &] [s2; @@image:875&475 -̀ێ۰̉ЏʖÁ׏ӿ -њ锟Ư썝֗󆄮̰㑞سƳۈۄݿʑʈ -ՉئԈà١ų㩨󳮪ǚȋ“𪚹ʃѯìᬊ -Ʀ۵ǑԘƝ͉訠鎧Ԕʹˬ撌ыɨѤ -ҨʣƨĿލŲΐ;̔܄п£ -񤉁ВሑИ⾛ȵ¯ޫȅʜ봤콥´ -工ȬŶղŰ֬͌إМ݊ṌԹã -ڨƏКǒե܅ن唯ԩ͌̕훳؞nj߱ -팉؊̴ЩݒѼԤռߤѐ欃 -Έ܊ǂՊùțѭʰܤDŽ՝猓ꬨʣ -Қ锟欹͈󆍿꽆ȃݿnj懣ٝޕǴУ -ؚڷ羭ǧ֣҇񙱾ዔԏތҨ¿ -쓮ҫ面†㬶滜謂եȺǵ -̃ȔʓЗ꫊šŒة݆ -ꞭƿƫՅ򢎴ʏҨʻ򣴿ʏݑ〟 +(A4wATAAAALT/AAAAAHic7V1bjtswDMyJ9x49Qm/Qj6JXdIF+GIrmIcqWbW7DgREkEjkiOZISawHv148/X3Wlv7ZCYpRG+VEa5UdplB+dRq937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xaKwCuwL3P09VpdzNavpqSDoetDFdJ40xx7W4/3mqkTl8QKPgRFprTINfjgefp4qWymtW6NJoe8/IFND3oqXKnZJQF7NHdfZxY+qrCnIFvuk5w8KaDKluWCken6kRXYYXjXUerUa/f/2sK9WFGhVyojTKj9IoP0qj/CiN8qM0yo+vp//Fc12R6y/AZWMf) &] [s0; &] [s0; [/ Derived from] [^topic`:`/`/CtrlLib`/src`/TextCtrl`$en`-us`#TextCtrl`:`:class^ Tex @@ -47,6 +33,12 @@ ont]_[*@3 f])&] [s2; Sets the font to be used by widget to [%-*@3 f].&] [s3; &] [s4;%- &] +[s5;:DocEdit`:`:After`(int`):%- [_^DocEdit^ DocEdit][@(0.0.255) `&]_[* After]([@(0.0.255) int +]_[*@3 a])&] +[s2; The height of empty block after the paragraph in pixels. Default +is 0.&] +[s3; &] +[s4;%- &] [s5;:DocEdit`:`:SetFilter`(int`(`*`)`(int c`)`):%- [_^DocEdit^ DocEdit][@(0.0.255) `&]_[* S etFilter]([@(0.0.255) int]_(`*[*@3 f])([@(0.0.255) int]_c))&] [s2; [%- Sets the character filter] [%-*@3 f]. All characters keystrokes @@ -61,6 +53,11 @@ ool]_[*@3 b]_`=_[@(0.0.255) true])&] is active by default.&] [s3; &] [s4;%- &] +[s5;:DocEdit`:`:IsAutoHideSb`(`)const:%- [@(0.0.255) bool]_[* IsAutoHideSb]()_[@(0.0.255) c +onst]&] +[s2; Returns true if AutoHideSb is active.&] +[s3;%- &] +[s4;%- &] [s5;:DocEdit`:`:UpDownLeave`(bool`):%- [_^DocEdit^ DocEdit][@(0.0.255) `&]_[* UpDownLeave]( [@(0.0.255) bool]_[*@3 u]_`=_[@(0.0.255) true])&] [s2; In UpDownLeave mode, Up key at the top of text or Down key at @@ -78,4 +75,24 @@ the focus to previous / next Ctrl that IsWantFocus.&] onst]&] [s2; Tests UpDownLeave mode.&] [s3; &] -[s0; ] \ No newline at end of file +[s4;%- &] +[s5;:DocEdit`:`:SetScrollBarStyle`(const ScrollBar`:`:Style`&`):%- [_^DocEdit^ DocEdit][@(0.0.255) `& +]_[* SetScrollBarStyle]([@(0.0.255) const]_[_^ScrollBar`:`:Style^ ScrollBar`::Style][@(0.0.255) `& +]_[*@3 s])&] +[s2; Sets the chameleon style of scrollbar.&] +[s3; &] +[s4;%- &] +[s5;:DocEdit`:`:EofLine`(bool`):%- [_^DocEdit^ DocEdit][@(0.0.255) `&]_[* EofLine]([@(0.0.255) b +ool]_[*@3 b]_`=_[@(0.0.255) true])&] +[s2; If active, paints faint line at the end of text. Default is +active.&] +[s3; &] +[s4;%- &] +[s5;:DocEdit`:`:NoEofLine`(`):%- [_^DocEdit^ DocEdit][@(0.0.255) `&]_[* NoEofLine]()&] +[s2; Same as EofFile(false).&] +[s3;%- &] +[s4;%- &] +[s5;:DocEdit`:`:IsEofLine`(`)const:%- [@(0.0.255) bool]_[* IsEofLine]()_[@(0.0.255) const]&] +[s2; Returns true if EofLine is active.&] +[s3;%- &] +[s0; ]] \ No newline at end of file diff --git a/uppsrc/PostgreSQL/PostgreSQL.cpp b/uppsrc/PostgreSQL/PostgreSQL.cpp index 17ed4d1e1..b8d71b249 100644 --- a/uppsrc/PostgreSQL/PostgreSQL.cpp +++ b/uppsrc/PostgreSQL/PostgreSQL.cpp @@ -512,12 +512,13 @@ bool PostgreSQLConnection::Execute() if(*s == '\'' || *s == '\"') s = PostgreSQLReadString(s, query); else { - if(pi >= param.GetCount()) { - session->SetError("Invalid number of parameters", statement); - return false; - } - if(*s == '?') + if(*s == '?') { + if(pi >= param.GetCount()) { + session.SetError("Invalid number of parameters", statement); + return false; + } query.Cat(param[pi++]); + } else query.Cat(*s); s++;