equal
deleted
inserted
replaced
2253 , '\' |
2253 , '\' |
2254 . |
2254 . |
2255 |
2255 |
2256 columns do: |
2256 columns do: |
2257 [:aColumn| |
2257 [:aColumn| |
2258 ((sel := aColumn backgroundSelector) notNil and:[(aClass implements:sel) not]) |
2258 ((sel := aColumn backgroundSelector) notNil and:[(aClass includesSelector:sel) not]) |
2259 ifTrue: |
2259 ifTrue: |
2260 [ |
2260 [ |
2261 bCode := sel asString, code, ' ^nil'. |
2261 bCode := sel asString, code, ' ^nil'. |
2262 self compile:bCode forClass:aClass inCategory:catg |
2262 self compile:bCode forClass:aClass inCategory:catg |
2263 ] |
2263 ] |
2264 ] |
2264 ] |
2265 |
|
2266 |
|
2267 ! |
2265 ! |
2268 |
2266 |
2269 generateChoicesIn:aClass |
2267 generateChoicesIn:aClass |
2270 "generate code for #choices" |
2268 "generate code for #choices" |
2271 |
2269 |
2284 edt := aColumn editorType. |
2282 edt := aColumn editorType. |
2285 |
2283 |
2286 ( aColumn canSelect |
2284 ( aColumn canSelect |
2287 and:[(sel := aColumn choices) notNil |
2285 and:[(sel := aColumn choices) notNil |
2288 and:[(edt == #ComboBox or:[edt == #ComboList]) |
2286 and:[(edt == #ComboBox or:[edt == #ComboList]) |
2289 and:[(aClass implements:sel) not]]] |
2287 and:[(aClass includesSelector:sel) not]]] |
2290 ) ifTrue:[ |
2288 ) ifTrue:[ |
2291 self compile:(sel asString, code) forClass:aClass inCategory:catg |
2289 self compile:(sel asString, code) forClass:aClass inCategory:catg |
2292 ] |
2290 ] |
2293 ] |
2291 ] |
2294 ! |
2292 ! |
2307 . |
2305 . |
2308 |
2306 |
2309 columns do: |
2307 columns do: |
2310 [:aColumn| |
2308 [:aColumn| |
2311 ((sel := aColumn doubleClickedSelector) notNil |
2309 ((sel := aColumn doubleClickedSelector) notNil |
2312 and:[(aClass implements:sel) not]) |
2310 and:[(aClass includesSelector:sel) not]) |
2313 ifTrue: |
2311 ifTrue: |
2314 [ |
2312 [ |
2315 bCode := sel asString, code. |
2313 bCode := sel asString, code. |
2316 self compile:bCode forClass:aClass inCategory:catg |
2314 self compile:bCode forClass:aClass inCategory:catg |
2317 ] |
2315 ] |
2318 ] |
2316 ] |
2319 |
|
2320 |
|
2321 ! |
2317 ! |
2322 |
2318 |
2323 generateForegroundSelectorIn:aClass |
2319 generateForegroundSelectorIn:aClass |
2324 "generate code for #foregroundSelector |
2320 "generate code for #foregroundSelector |
2325 " |
2321 " |
2334 . |
2330 . |
2335 |
2331 |
2336 columns do: |
2332 columns do: |
2337 [:aColumn| |
2333 [:aColumn| |
2338 ((sel := aColumn foregroundSelector) notNil |
2334 ((sel := aColumn foregroundSelector) notNil |
2339 and:[(aClass implements:sel) not]) |
2335 and:[(aClass includesSelector:sel) not]) |
2340 ifTrue: |
2336 ifTrue: |
2341 [ |
2337 [ |
2342 bCode := sel asString, code, ' ^nil'. |
2338 bCode := sel asString, code, ' ^nil'. |
2343 self compile:bCode forClass:aClass inCategory:catg |
2339 self compile:bCode forClass:aClass inCategory:catg |
2344 ] |
2340 ] |
2345 ] |
2341 ] |
2346 |
|
2347 |
|
2348 ! |
2342 ! |
2349 |
2343 |
2350 generateMenuIn:aClass |
2344 generateMenuIn:aClass |
2351 "generate code for #menu" |
2345 "generate code for #menu" |
2352 |
2346 |
2363 |
2357 |
2364 columns do: |
2358 columns do: |
2365 [:aColumn| |
2359 [:aColumn| |
2366 (aColumn canSelect |
2360 (aColumn canSelect |
2367 and:[(sel := aColumn menu) notNil |
2361 and:[(sel := aColumn menu) notNil |
2368 and:[(aClass implements:sel) not]]) |
2362 and:[(aClass includesSelector:sel) not]]) |
2369 ifTrue: |
2363 ifTrue: |
2370 [ |
2364 [ |
2371 self compile:(sel asString, code) forClass:aClass inCategory:catg |
2365 self compile:(sel asString, code) forClass:aClass inCategory:catg |
2372 ] |
2366 ] |
2373 ] |
2367 ] |
2388 . |
2382 . |
2389 |
2383 |
2390 columns do:[:aColumn| |
2384 columns do:[:aColumn| |
2391 ( aColumn rendererType ~~ #rowSelector |
2385 ( aColumn rendererType ~~ #rowSelector |
2392 and:[(sel := aColumn printSelector) notNil |
2386 and:[(sel := aColumn printSelector) notNil |
2393 and:[(aClass implements:sel) not]] |
2387 and:[(aClass includesSelector:sel) not]] |
2394 ) ifTrue:[ |
2388 ) ifTrue:[ |
2395 |numArgs bcode keys| |
2389 |numArgs bcode keys| |
2396 bcode := sel asString. |
2390 bcode := sel asString. |
2397 numArgs := sel numArgs. |
2391 numArgs := sel numArgs. |
2398 |
2392 |
2424 |
2418 |
2425 columns do: |
2419 columns do: |
2426 [:aColumn| |
2420 [:aColumn| |
2427 (aColumn rendererType ~~ #rowSelector |
2421 (aColumn rendererType ~~ #rowSelector |
2428 and:[(sel := aColumn readSelector) notNil |
2422 and:[(sel := aColumn readSelector) notNil |
2429 and:[(aClass implements:sel) not]]) |
2423 and:[(aClass includesSelector:sel) not]]) |
2430 ifTrue: |
2424 ifTrue: |
2431 [ |
2425 [ |
2432 (aColumn printSelector isNil or:[aColumn canSelect]) |
2426 (aColumn printSelector isNil or:[aColumn canSelect]) |
2433 ifTrue: |
2427 ifTrue: |
2434 [ |
2428 [ |
2460 , '\' |
2454 , '\' |
2461 . |
2455 . |
2462 |
2456 |
2463 columns do: |
2457 columns do: |
2464 [:aColumn| |
2458 [:aColumn| |
2465 ((sel := aColumn rowSeparatorSelector) notNil and:[(aClass implements:sel) not]) |
2459 ((sel := aColumn rowSeparatorSelector) notNil and:[(aClass includesSelector:sel) not]) |
2466 ifTrue: |
2460 ifTrue: |
2467 [ |
2461 [ |
2468 bCode := sel asString, code, ' ^true'. |
2462 bCode := sel asString, code, ' ^true'. |
2469 self compile:bCode forClass:aClass inCategory:catg |
2463 self compile:bCode forClass:aClass inCategory:catg |
2470 ] |
2464 ] |
2471 ] |
2465 ] |
2472 |
|
2473 |
|
2474 ! |
2466 ! |
2475 |
2467 |
2476 generateSelectSelectorIn:aClass |
2468 generateSelectSelectorIn:aClass |
2477 "generate code for #selectSelector |
2469 "generate code for #selectSelector |
2478 " |
2470 " |
2488 |
2480 |
2489 columns do: |
2481 columns do: |
2490 [:aColumn| |
2482 [:aColumn| |
2491 (aColumn rendererType ~~ #rowSelector |
2483 (aColumn rendererType ~~ #rowSelector |
2492 and:[(sel := aColumn selectSelector) notNil |
2484 and:[(sel := aColumn selectSelector) notNil |
2493 and:[(aClass implements:sel) not]]) |
2485 and:[(aClass includesSelector:sel) not]]) |
2494 ifTrue: |
2486 ifTrue: |
2495 [ |
2487 [ |
2496 aColumn canSelect |
2488 aColumn canSelect |
2497 ifTrue: |
2489 ifTrue: |
2498 [ |
2490 [ |
2520 edt := aColumn editorType. |
2512 edt := aColumn editorType. |
2521 |
2513 |
2522 ( aColumn canSelect |
2514 ( aColumn canSelect |
2523 and:[(sel := aColumn showComboFieldSelector) notNil |
2515 and:[(sel := aColumn showComboFieldSelector) notNil |
2524 and:[(edt == #ComboBox or:[edt == #ComboList]) |
2516 and:[(edt == #ComboBox or:[edt == #ComboList]) |
2525 and:[(aClass implements:sel) not]]] |
2517 and:[(aClass includesSelector:sel) not]]] |
2526 ) ifTrue:[ |
2518 ) ifTrue:[ |
2527 state := edt == #ComboBoxView. |
2519 state := edt == #ComboBoxView. |
2528 |
2520 |
2529 bCode := sel asString, code, ' ^ ', state printString. |
2521 bCode := sel asString, code, ' ^ ', state printString. |
2530 self compile:bCode forClass:aClass inCategory:catg |
2522 self compile:bCode forClass:aClass inCategory:catg |
2531 ] |
2523 ] |
2532 ] |
2524 ] |
2533 |
|
2534 |
|
2535 ! |
2525 ! |
2536 |
2526 |
2537 generateWriteSelectorIn:aClass |
2527 generateWriteSelectorIn:aClass |
2538 "generate code for #writeSelector" |
2528 "generate code for #writeSelector" |
2539 |
2529 |
2549 columns do: |
2539 columns do: |
2550 [:aColumn| |
2540 [:aColumn| |
2551 ((sel := aColumn writeSelector) notNil |
2541 ((sel := aColumn writeSelector) notNil |
2552 and:[aColumn editorType ~~ #None |
2542 and:[aColumn editorType ~~ #None |
2553 and:[aColumn canSelect |
2543 and:[aColumn canSelect |
2554 and:[(aClass implements:sel) not]]]) |
2544 and:[(aClass includesSelector:sel) not]]]) |
2555 ifTrue: |
2545 ifTrue: |
2556 [ |
2546 [ |
2557 sel numArgs == 1 |
2547 sel numArgs == 1 |
2558 ifTrue: |
2548 ifTrue: |
2559 [ |
2549 [ |